forked from wikimedia/pywikibot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[cleanup] Consistently use string's format()
String formatting from PEP3101 is intended to replace printf style formatting [1][2]. date.py, i18n.py, and a few scripts have especially sophisticated usage so leaving those be. This also drops unnecessary index references [3] and repr() [4] from format calls. [1] https://www.python.org/dev/peps/pep-3101/#abstract [2] https://docs.python.org/3/library/stdtypes.html#printf-style-string-formatting [3] The following are identical... >>> '{0} {1}'.format('arg1', 'arg2') >>> '{} {}'.format('arg1', 'arg2') [4] The following are identical... >>> 'repr value: {}.format(repr(my_arg)) >>> 'repr value: {!r}.format(my_arg) Change-Id: I5191814201ca1f4dcfa3a6c587be0dd2b9fe76ff
- Loading branch information
Showing
123 changed files
with
1,215 additions
and
1,171 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.