Skip to content

Commit 1db0bcf

Browse files
authored
More print strings (#52)
* changed line 132 to have str.format() * Adjusted lines 41-47 * Changed line 52 to str.format() * Revert "changed line 132 to have str.format()" This reverts commit 05c17f9. * Revert "Adjusted lines 41-47" This reverts commit 5fd6367. * added more str.format() to feed.py * changed dictionary to list on lines 43 and 46 * Added new version number (0.30.0) and minor upates to project.zip
1 parent 26cf13f commit 1db0bcf

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77

88
setup(name='flashbake',
9-
version='0.27.1',
9+
version='0.30.0',
1010
author="Thomas Gideon",
1111
author_email="cmdln@thecommandline.net",
1212
maintainer="Thomas Gideon",

src/flashbake/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
import sys #@Reimport
3131
import builtins
3232

33-
__version__ = '0.27.1'
33+
__version__ = '0.30.0'
3434

3535
class ConfigError(Exception):
3636
pass

src/flashbake/plugins/feed.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,17 @@ def addcontext(self, message_file, config):
3939

4040
if len(last_items) > 0:
4141
if self.author == None:
42-
message_file.write('Last %(item_count)d entries from %(feed_title)s:\n'\
43-
% {'item_count' : len(last_items), 'feed_title' : title})
42+
message_file.write('Last {} entries from {}:\n'\
43+
.format(*[len(last_items), title]))
4444
else:
45-
message_file.write('Last %(item_count)d entries from %(feed_title)s by %(author)s:\n'\
46-
% {'item_count' : len(last_items), 'feed_title' : title, 'author' or 'dc:creator' : self.author})
45+
message_file.write('Last {} entries from {} by {}:\n'\
46+
.format(*[len(last_items), title, self.author]))
4747
for item in last_items:
48-
# edit the '%s' if you want to add a label, like 'Title %s' to the output
48+
4949
message_file.write(f'{item["title"]}\n')
5050
message_file.write(f'{item["link"]}\n')
5151
else:
52-
message_file.write('Couldn\'t fetch entries from feed, %s.\n' % self.url)
52+
message_file.write('Couldn\'t fetch entries from feed, {}\n'.format(self.url))
5353

5454
return len(last_items) > 0
5555

test/project.zip

705 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)