jenkins-bot has submitted this change and it was merged.
Change subject: [IMPROV] Reduce maximum line length to 130 ......................................................................
[IMPROV] Reduce maximum line length to 130
Change-Id: Iaf41e959fd03040b6428f061f2ea4a1586cf3c32 --- M pywikibot/families/wikibooks_family.py M pywikibot/families/wikiquote_family.py M pywikibot/fixes.py M pywikibot/site.py M scripts/commonscat.py M scripts/coordinate_import.py M scripts/fixing_redirects.py M scripts/harvest_template.py M scripts/imagerecat.py M scripts/login.py M scripts/solve_disambiguation.py M tests/deprecation_tests.py M tests/ipregex_tests.py M tests/textlib_tests.py M tox.ini 15 files changed, 95 insertions(+), 50 deletions(-)
Approvals: John Vandenberg: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/families/wikibooks_family.py b/pywikibot/families/wikibooks_family.py index eccb20f..baf844c 100644 --- a/pywikibot/families/wikibooks_family.py +++ b/pywikibot/families/wikibooks_family.py @@ -72,7 +72,7 @@ 'jp': 'ja', 'kn': None, # https://bugzilla.wikimedia.org/show_bug.cgi?id=20325 'ks': None, # https://meta.wikimedia.org/wiki/Proposals_for_closing_projects/Closure_of_Ka... - 'lb': None, # https://meta.wikimedia.org/wiki/Proposals_for_closing_projects/Closure_of_L%... + 'lb': None, # noqa https://meta.wikimedia.org/wiki/Proposals_for_closing_projects/Closure_of_L%... 'ln': None, # https://meta.wikimedia.org/wiki/Proposals_for_closing_projects/Closure_of_Li... 'lv': None, # https://meta.wikimedia.org/wiki/Proposals_for_closing_projects/Closure_of_La... 'mi': None, # https://meta.wikimedia.org/wiki/Proposals_for_closing_projects/Closure_of_Ma... @@ -82,12 +82,12 @@ 'na': None, # https://meta.wikimedia.org/wiki/Proposals_for_closing_projects/Closure_of_Na... 'nah': None, # https://meta.wikimedia.org/wiki/Proposals_for_closing_projects/Closure_of_Na... 'nb': 'no', - 'nds': None, # https://meta.wikimedia.org/wiki/Proposals_for_closing_projects/Closure_of_Pl... + 'nds': None, # noqa https://meta.wikimedia.org/wiki/Proposals_for_closing_projects/Closure_of_Pl... 'ps': None, # https://meta.wikimedia.org/wiki/Proposals_for_closing_projects/Closure_of_Pa... 'qu': None, # https://meta.wikimedia.org/wiki/Proposals_for_closing_projects/Closure_of_Qu... 'rm': None, # https://meta.wikimedia.org/wiki/Proposals_for_closing_projects/Closure_of_Ru... 'se': None, # https://meta.wikimedia.org/wiki/Proposals_for_closing_projects/Closure_of_Sa... - 'simple': None, # https://meta.wikimedia.org/wiki/Proposals_for_closing_projects/Closure_of_Si...) + 'simple': None, # noqa https://meta.wikimedia.org/wiki/Proposals_for_closing_projects/Closure_of_Si...) 'su': None, # https://meta.wikimedia.org/wiki/Proposals_for_closing_projects/Closure_of_Ba...) 'sw': None, # https://bugzilla.wikimedia.org/show_bug.cgi?id=25170 'tk': None, diff --git a/pywikibot/families/wikiquote_family.py b/pywikibot/families/wikiquote_family.py index 3c91152..52dfffb 100644 --- a/pywikibot/families/wikiquote_family.py +++ b/pywikibot/families/wikiquote_family.py @@ -76,7 +76,7 @@ 'nb': 'no', 'nds': None, # https://meta.wikimedia.org/wiki/Proposals_for_closing_projects/Closure_of_Lo... 'qu': None, # https://meta.wikimedia.org/wiki/Proposals_for_closing_projects/Closure_of_Qu... - 'simple': None, # https://meta.wikimedia.org/wiki/Proposals_for_closing_projects/Closure_of_Si... + 'simple': None, # noqa https://meta.wikimedia.org/wiki/Proposals_for_closing_projects/Closure_of_Si...) 'tk': None, # https://meta.wikimedia.org/wiki/Proposals_for_closing_projects/Closure_of_Tu... 'tokipona': None, 'tt': None, # https://meta.wikimedia.org/wiki/Proposals_for_closing_projects/Closure_of_Ta... diff --git a/pywikibot/fixes.py b/pywikibot/fixes.py index a045db3..3261004 100644 --- a/pywikibot/fixes.py +++ b/pywikibot/fixes.py @@ -109,7 +109,7 @@ 'de': u'Bot: korrigiere Grammatik', }, 'replacements': [ - # (u'([Ss]owohl) ([^,.]+?), als auch', r'\1 \2 als auch'), + # (u'([Ss]owohl) ([^,.]+?), als auch', r'\1 \2 als auch'), # (u'([Ww]eder) ([^,.]+?), noch', r'\1 \2 noch'), # # Vorsicht bei Substantiven, z. B. 3-Jähriger! @@ -170,7 +170,9 @@ r'/\w(,\w)*/', # Laut-Aufzählung in der Linguistik r'[xyz](,[xyz])+', # Variablen in der Mathematik (unklar, ob Leerzeichen hier Pflicht sind) r'(?m)^;(.*?)$', # Definitionslisten, dort gibt es oft absichtlich Leerzeichen vor Doppelpunkten - r'\d+h( | )\d+m', # Schreibweise für Zeiten, vor allem in Film-Infoboxen. Nicht korrekt, aber dafür schön kurz. + r'\d+h( | )\d+m', + # Schreibweise für Zeiten, vor allem in Film-Infoboxen. + # Nicht korrekt, aber dafür schön kurz. r'(?i)[[(Bild|Image|Media):.+?|', # Dateinamen auslassen r'{{bgc|.*?}}', # Hintergrundfarbe r'<sup>\d+m</sup>', # bei chemischen Formeln @@ -301,7 +303,8 @@ # dash in external link, where the correct end of the URL can # be detected from the file extension. It is very unlikely that # this will cause mistakes. - (r'[(?P<url>https?://[^|] ]+?(.pdf|.html|.htm|.php|.asp|.aspx|.jsp)) *| *(?P<label>[^|]]+?)]', r'[\g<url> \g<label>]'), + (r'[(?P<url>https?://[^|] ]+?(.pdf|.html|.htm|.php|.asp|.aspx|.jsp)) *|' + r' *(?P<label>[^|]]+?)]', r'[\g<url> \g<label>]'), ], 'exceptions': { 'inside-tags': [ @@ -401,13 +404,17 @@ # space after death sign w/ linked date # (u'†[[(\d)', u'† [[\1'), # (u'†[[(\d)', u'† [[\1'), - (u'[[(\d+. (?:Januar|Februar|März|April|Mai|Juni|Juli|August|September|Oktober|November|Dezember)) (\d{1,4})]]', u'[[\1]] [[\2]]'), + (u'[[(\d+. (?:Januar|Februar|März|April|Mai|Juni|Juli|August|' + u'September|Oktober|November|Dezember)) (\d{1,4})]]', u'[[\1]] [[\2]]'), # Keine führende Null beim Datum (ersteinmal nur bei denen, bei denen auch ein Leerzeichen fehlt) - (u'0(\d+).(Januar|Februar|März|April|Mai|Juni|Juli|August|September|Oktober|November|Dezember)', r'\1. \2'), + (u'0(\d+).(Januar|Februar|März|April|Mai|Juni|Juli|August|' + u'September|Oktober|November|Dezember)', r'\1. \2'), # Kein Leerzeichen zwischen Tag und Monat - (u'(\d+).(Januar|Februar|März|April|Mai|Juni|Juli|August|September|Oktober|November|Dezember)', r'\1. \2'), + (u'(\d+).(Januar|Februar|März|April|Mai|Juni|Juli|August|' + u'September|Oktober|November|Dezember)', r'\1. \2'), # Kein Punkt vorm Jahr - (u'(\d+). (Januar|Februar|März|April|Mai|Juni|Juli|August|September|Oktober|November|Dezember).(\d{1,4})', r'\1. \2 \3'), + (u'(\d+). (Januar|Februar|März|April|Mai|Juni|Juli|August|' + u'September|Oktober|November|Dezember).(\d{1,4})', r'\1. \2 \3'), ], 'exceptions': { 'inside': [ diff --git a/pywikibot/site.py b/pywikibot/site.py index 873cc6b..913bfc2 100644 --- a/pywikibot/site.py +++ b/pywikibot/site.py @@ -3956,12 +3956,16 @@ "noapiwrite": "API editing not enabled on %(site)s wiki", "writeapidenied": "User %(user)s is not authorized to edit on %(site)s wiki", "cantcreate": "User %(user)s not authorized to create new pages on %(site)s wiki", - "cantcreate-anon": """Bot is not logged in, and anon users are not authorized to create new pages on %(site)s wiki""", - "noimageredirect-anon": """Bot is not logged in, and anon users are not authorized to create image redirects on %(site)s wiki""", + "cantcreate-anon": + "Bot is not logged in, and anon users are not authorized to create " + "new pages on %(site)s wiki", + "noimageredirect-anon": + "Bot is not logged in, and anon users are not authorized to create " + "image redirects on %(site)s wiki", "noimageredirect": "User %(user)s not authorized to create image redirects on %(site)s wiki", "filtered": "%(info)s", "contenttoobig": "%(info)s", - "noedit-anon": """Bot is not logged in, and anon users are not authorized to edit on %(site)s wiki""", + "noedit-anon": "Bot is not logged in, and anon users are not authorized to edit on %(site)s wiki", "noedit": "User %(user)s not authorized to edit pages on %(site)s wiki",
"missingtitle": NoCreateError, diff --git a/scripts/commonscat.py b/scripts/commonscat.py index cc9fb19..adabbe4 100755 --- a/scripts/commonscat.py +++ b/scripts/commonscat.py @@ -456,7 +456,9 @@ loguser = logitem.user() logcomment = logitem.comment() # Some logic to extract the target page. - regex = u'moved to [[:?Category:(?P<newcat1>[^|}]+)(|[^}]+)?]]|Robot: Changing Category:(.+) to Category:(?P<newcat2>.+)' + regex = ( + r'moved to [[:?Category:(?P<newcat1>[^|}]+)(|[^}]+)?]]|' + r'Robot: Changing Category:(.+) to Category:(?P<newcat2>.+)') m = re.search(regex, logcomment, flags=re.I) if m: if m.group('newcat1'): diff --git a/scripts/coordinate_import.py b/scripts/coordinate_import.py index f4f680e..6074ba3 100644 --- a/scripts/coordinate_import.py +++ b/scripts/coordinate_import.py @@ -7,10 +7,12 @@
python coordinate_import.py -lang:en -family:wikipedia -cat:Category:Coordinates_not_on_Wikidata
-This will work on all pages in the category "coordinates not on Wikidata" and will import the coordinates on these pages to Wikidata. +This will work on all pages in the category "coordinates not on Wikidata" and +will import the coordinates on these pages to Wikidata.
-The data from the "GeoData" extension (https://www.mediawiki.org/wiki/Extension:GeoData) is used so that extension has to be setup properly. -You can look at the [[Special:Nearby]] page on your local Wiki to see if it's populated. +The data from the "GeoData" extension (https://www.mediawiki.org/wiki/Extension:GeoData) +is used so that extension has to be setup properly. You can look at the +[[Special:Nearby]] page on your local Wiki to see if it's populated.
You can use any typical pagegenerator to provide with a list of pages:
diff --git a/scripts/fixing_redirects.py b/scripts/fixing_redirects.py index 10de73d..c8a8a51 100644 --- a/scripts/fixing_redirects.py +++ b/scripts/fixing_redirects.py @@ -66,7 +66,8 @@ linktrail = mysite.linktrail()
# make a backup of the original text so we can show the changes later - linkR = re.compile(r'[[(?P<title>[^]|#]*)(?P<section>#[^]|]*)?(|(?P<label>[^]]*))?]](?P<linktrail>' + linktrail + ')') + linkR = re.compile(r'[[(?P<title>[^]|#]*)(?P<section>#[^]|]*)?' + r'(|(?P<label>[^]]*))?]](?P<linktrail>' + linktrail + ')') curpos = 0 # This loop will run until we have finished the current page while True: diff --git a/scripts/harvest_template.py b/scripts/harvest_template.py index 102931d..d5e0d64 100755 --- a/scripts/harvest_template.py +++ b/scripts/harvest_template.py @@ -5,11 +5,8 @@
Usage:
-python harvest_template.py -transcludes:"..." template_parameter PID [template_parameter PID] - - or - -python harvest_template.py [generators] -template:"..." template_parameter PID [template_parameter PID] +* harvest_template.py -transcludes:"..." template_parameter PID [template_parameter PID] +* harvest_template.py [generators] -template:"..." template_parameter PID [template_parameter PID]
This will work on all pages that transclude the template in the article namespace @@ -20,7 +17,7 @@
Examples:
-python harvest_template.py -lang:nl -cat:Sisoridae -template:"Taxobox straalvinnige" -namespace:0 orde P70 familie P71 geslacht P74 +* harvest_template.py -lang:nl -cat:Sisoridae -template:"Taxobox straalvinnige" -namespace:0 orde P70 familie P71 geslacht P74
""" # @@ -147,7 +144,9 @@ # Try to extract a valid page match = re.search(pywikibot.link_regex, value) if not match: - pywikibot.output(u'%s field %s value %s isnt a wikilink. Skipping' % (claim.getID(), field, value)) + pywikibot.output( + u'%s field %s value %s isnt a wikilink. Skipping' + % (claim.getID(), field, value)) continue
link_text = match.group(1) diff --git a/scripts/imagerecat.py b/scripts/imagerecat.py index 70e7ccd..7bf8f1d 100644 --- a/scripts/imagerecat.py +++ b/scripts/imagerecat.py @@ -146,7 +146,12 @@ # Cant handle other sites atm return [], [], []
- commonsenseRe = re.compile('^#COMMONSENSE(.*)#USAGE(\s)+((?P<usagenum>(\d)+))\s(?P<usage>(.*))\s#KEYWORDS(\s)+((?P<keywords>(\d)+))(.*)#CATEGORIES(\s)+((?P<catnum>(\d)+))\s(?P<cats>(.*))\s#GALLERIES(\s)+((?P<galnum>(\d)+))\s(?P<gals>(.*))\s(.*)#EOF$', re.MULTILINE + re.DOTALL) # noqa + commonsenseRe = re.compile( + '^#COMMONSENSE(.*)#USAGE(\s)+((?P<usagenum>(\d)+))\s(?P<usage>(.*))\s' + '#KEYWORDS(\s)+((?P<keywords>(\d)+))(.*)' + '#CATEGORIES(\s)+((?P<catnum>(\d)+))\s(?P<cats>(.*))\s' + '#GALLERIES(\s)+((?P<galnum>(\d)+))\s(?P<gals>(.*))\s(.*)#EOF$', + re.MULTILINE + re.DOTALL)
gotInfo = False matches = None diff --git a/scripts/login.py b/scripts/login.py index 71cdbb2..8d52556 100755 --- a/scripts/login.py +++ b/scripts/login.py @@ -86,7 +86,8 @@ elif arg == "-all": logall = True elif arg == "-force": - pywikibot.output(u"To force a re-login, please delete the revelant lines from '%s' (or the entire file) and try again." % + pywikibot.output(u"To force a re-login, please delete the revelant " + u"lines from '%s' (or the entire file) and try again." % join(config.base_dir, 'pywikibot.lwp')) elif arg == "-logout": logout = True diff --git a/scripts/solve_disambiguation.py b/scripts/solve_disambiguation.py index 83d1050..660a7ba 100644 --- a/scripts/solve_disambiguation.py +++ b/scripts/solve_disambiguation.py @@ -972,14 +972,22 @@ {'from': disambPage.title()} ) else: - self.comment = i18n.twtranslate(self.mysite, 'solve_disambiguation-redirect-resolved', {'from': disambPage.title(), 'to': targets}) + self.comment = i18n.twtranslate( + self.mysite, 'solve_disambiguation-redirect-resolved', + {'from': disambPage.title(), 'to': targets}) else: if unlink and not new_targets: - self.comment = i18n.twtranslate(self.mysite, 'solve_disambiguation-links-removed', {'from': disambPage.title()}) + self.comment = i18n.twtranslate( + self.mysite, 'solve_disambiguation-links-removed', + {'from': disambPage.title()}) elif dn and not new_targets: - self.comment = i18n.twtranslate(self.mysite, 'solve_disambiguation-adding-dn-template', {'from': disambPage.title()}) + self.comment = i18n.twtranslate( + self.mysite, 'solve_disambiguation-adding-dn-template', + {'from': disambPage.title()}) else: - self.comment = i18n.twtranslate(self.mysite, 'solve_disambiguation-links-resolved', {'from': disambPage.title(), 'to': targets}) + self.comment = i18n.twtranslate( + self.mysite, 'solve_disambiguation-links-resolved', + {'from': disambPage.title(), 'to': targets})
def run(self): if self.main_only: diff --git a/tests/deprecation_tests.py b/tests/deprecation_tests.py index 2b13e38..b9a662e 100644 --- a/tests/deprecation_tests.py +++ b/tests/deprecation_tests.py @@ -628,27 +628,33 @@ rv = f.deprecated_instance_method_args(bah='b', bah2='c') self.assertEqual(rv, ('b', 'c')) self.assertDeprecation( - 'bah argument of ' + __name__ + '.DeprecatedMethodClass.deprecated_instance_method_args is deprecated; use foo instead.') + 'bah argument of ' + __name__ + '.DeprecatedMethodClass.' + 'deprecated_instance_method_args is deprecated; use foo instead.') self.assertDeprecation( - 'bah2 argument of ' + __name__ + '.DeprecatedMethodClass.deprecated_instance_method_args is deprecated; use foo2 instead.') + 'bah2 argument of ' + __name__ + '.DeprecatedMethodClass.' + 'deprecated_instance_method_args is deprecated; use foo2 instead.')
DeprecatorTestCase._reset_messages()
rv = f.deprecated_instance_method_args(foo='b', bah2='c') self.assertEqual(rv, ('b', 'c')) self.assertNoDeprecation( - 'bah argument of ' + __name__ + '.DeprecatedMethodClass.deprecated_instance_method_args is deprecated; use foo instead.') + 'bah argument of ' + __name__ + '.DeprecatedMethodClass.' + 'deprecated_instance_method_args is deprecated; use foo instead.') self.assertDeprecation( - 'bah2 argument of ' + __name__ + '.DeprecatedMethodClass.deprecated_instance_method_args is deprecated; use foo2 instead.') + 'bah2 argument of ' + __name__ + '.DeprecatedMethodClass.' + 'deprecated_instance_method_args is deprecated; use foo2 instead.')
DeprecatorTestCase._reset_messages()
rv = f.deprecated_instance_method_args(foo2='c', bah='b') self.assertEqual(rv, ('b', 'c')) self.assertDeprecation( - 'bah argument of ' + __name__ + '.DeprecatedMethodClass.deprecated_instance_method_args is deprecated; use foo instead.') + 'bah argument of ' + __name__ + '.DeprecatedMethodClass.' + 'deprecated_instance_method_args is deprecated; use foo instead.') self.assertNoDeprecation( - 'bah2 argument of ' + __name__ + '.DeprecatedMethodClass.deprecated_instance_method_args is deprecated; use foo2 instead.') + 'bah2 argument of ' + __name__ + '.DeprecatedMethodClass.' + 'deprecated_instance_method_args is deprecated; use foo2 instead.')
DeprecatorTestCase._reset_messages()
@@ -666,7 +672,8 @@ self.assertDeprecation( __name__ + '.DeprecatedMethodClass.deprecated_instance_method_and_arg is deprecated.') self.assertNoDeprecation( - 'bah argument of ' + __name__ + '.DeprecatedMethodClass.deprecated_instance_method_and_arg is deprecated; use foo instead.') + 'bah argument of ' + __name__ + '.DeprecatedMethodClass.' + 'deprecated_instance_method_and_arg is deprecated; use foo instead.')
DeprecatorTestCase._reset_messages()
@@ -676,7 +683,8 @@ self.assertDeprecation( __name__ + '.DeprecatedMethodClass.deprecated_instance_method_and_arg is deprecated.') self.assertDeprecation( - 'bah argument of ' + __name__ + '.DeprecatedMethodClass.deprecated_instance_method_and_arg is deprecated; use foo instead.') + 'bah argument of ' + __name__ + '.DeprecatedMethodClass.' + 'deprecated_instance_method_and_arg is deprecated; use foo instead.')
DeprecatorTestCase._reset_messages()
@@ -686,7 +694,8 @@ self.assertDeprecation( __name__ + '.DeprecatedMethodClass.deprecated_instance_method_and_arg is deprecated.') self.assertNoDeprecation( - 'bah argument of ' + __name__ + '.DeprecatedMethodClass.deprecated_instance_method_and_arg is deprecated; use foo instead.') + 'bah argument of ' + __name__ + '.DeprecatedMethodClass.' + 'deprecated_instance_method_and_arg is deprecated; use foo instead.')
def test_deprecated_instance_method_and_arg2(self): """Test @deprecated and @deprecate_arg with instance methods.""" @@ -698,7 +707,8 @@ self.assertDeprecation( __name__ + '.DeprecatedMethodClass.deprecated_instance_method_and_arg2 is deprecated.') self.assertNoDeprecation( - 'bah argument of ' + __name__ + '.DeprecatedMethodClass.deprecated_instance_method_and_arg2 is deprecated; use foo instead.') + 'bah argument of ' + __name__ + '.DeprecatedMethodClass.' + 'deprecated_instance_method_and_arg2 is deprecated; use foo instead.')
DeprecatorTestCase._reset_messages()
@@ -708,7 +718,8 @@ self.assertDeprecation( __name__ + '.DeprecatedMethodClass.deprecated_instance_method_and_arg2 is deprecated.') self.assertDeprecation( - 'bah argument of ' + __name__ + '.DeprecatedMethodClass.deprecated_instance_method_and_arg2 is deprecated; use foo instead.') + 'bah argument of ' + __name__ + '.DeprecatedMethodClass.' + 'deprecated_instance_method_and_arg2 is deprecated; use foo instead.')
DeprecatorTestCase._reset_messages()
@@ -718,7 +729,8 @@ self.assertDeprecation( __name__ + '.DeprecatedMethodClass.deprecated_instance_method_and_arg2 is deprecated.') self.assertNoDeprecation( - 'bah argument of ' + __name__ + '.DeprecatedMethodClass.deprecated_instance_method_and_arg2 is deprecated; use foo instead.') + 'bah argument of ' + __name__ + '.DeprecatedMethodClass.' + 'deprecated_instance_method_and_arg2 is deprecated; use foo instead.')
if __name__ == '__main__': diff --git a/tests/ipregex_tests.py b/tests/ipregex_tests.py index cf61a19..75fe6a2 100644 --- a/tests/ipregex_tests.py +++ b/tests/ipregex_tests.py @@ -197,8 +197,10 @@ self.ipv6test(False, "1.2.3.4::")
# Testing IPv4 addresses represented as dotted-quads - # Leading zero's in IPv4 addresses not allowed: some systems treat the leading "0" in ".086" as the start of an octal number - # Update: The BNF in RFC-3986 explicitly defines the dec-octet (for IPv4 addresses) not to have a leading zero + # Leading zero's in IPv4 addresses not allowed: some systems treat the + # leading "0" in ".086" as the start of an octal number + # Update: The BNF in RFC-3986 explicitly defines the dec-octet + # (for IPv4 addresses) not to have a leading zero self.ipv6test(False, "fe80:0000:0000:0000:0204:61ff:254.157.241.086") self.ipv6test(True, "::ffff:192.0.2.128") # but this is OK, since there's a single digit self.ipv6test(False, "XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:1.2.3.4") diff --git a/tests/textlib_tests.py b/tests/textlib_tests.py index 630ced4..2ade780 100644 --- a/tests/textlib_tests.py +++ b/tests/textlib_tests.py @@ -209,7 +209,8 @@ self.assertEqual(func('{{ a }}'), [('a', OrderedDict())]) self.assertEqual(func('{{a|b=c}}'), [('a', OrderedDict((('b', 'c'), )))]) self.assertEqual(func('{{a|b|c=d}}'), [('a', OrderedDict((('1', 'b'), ('c', 'd'))))]) - self.assertEqual(func('{{a|b=c|f=g|d=e|1=}}'), [('a', OrderedDict((('b', 'c'), ('f', 'g'), ('d', 'e'), ('1', ''))))]) + self.assertEqual(func('{{a|b=c|f=g|d=e|1=}}'), + [('a', OrderedDict((('b', 'c'), ('f', 'g'), ('d', 'e'), ('1', ''))))]) self.assertEqual(func('{{a|1=2|c=d}}'), [('a', OrderedDict((('1', '2'), ('c', 'd'))))]) self.assertEqual(func('{{a|c=d|1=2}}'), [('a', OrderedDict((('c', 'd'), ('1', '2'))))]) self.assertEqual(func('{{a|5=d|a=b}}'), [('a', OrderedDict((('5', 'd'), ('a', 'b'))))]) @@ -217,7 +218,8 @@ self.assertEqual(func('{{a|=|}}'), [('a', OrderedDict((('', ''), ('1', ''))))]) self.assertEqual(func('{{a||}}'), [('a', OrderedDict((('1', ''), ('2', ''))))]) self.assertEqual(func('{{a|b={{{1}}}}}'), [('a', OrderedDict((('b', '{{{1}}}'), )))]) - self.assertEqual(func('{{a|b=<noinclude>{{{1}}}</noinclude>}}'), [('a', OrderedDict((('b', '<noinclude>{{{1}}}</noinclude>'), )))]) + self.assertEqual(func('{{a|b=<noinclude>{{{1}}}</noinclude>}}'), + [('a', OrderedDict((('b', '<noinclude>{{{1}}}</noinclude>'), )))]) self.assertEqual(func('{{subst:a|b=c}}'), [('subst:a', OrderedDict((('b', 'c'), )))]) self.assertEqual(func('{{safesubst:a|b=c}}'), [('safesubst:a', OrderedDict((('b', 'c'), )))]) self.assertEqual(func('{{msgnw:a|b=c}}'), [('msgnw:a', OrderedDict((('b', 'c'), )))]) diff --git a/tox.ini b/tox.ini index 915cf18..b0e14ae 100644 --- a/tox.ini +++ b/tox.ini @@ -136,10 +136,10 @@ [flake8] ignore = E122,E127,E241,E265 exclude = .tox,.git,./*.egg,ez_setup.py,build,externals,user-config.py,./scripts/i18n/* -max_line_length = 150 +max_line_length = 130
[pep8] ignore = E122,E127,E241 exclude = .tox,.git,./*.egg,ez_setup.py,build,externals,user-config.py,./scripts/i18n/* -max_line_length = 150 +max_line_length = 130
pywikibot-commits@lists.wikimedia.org