jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/266062 )
Change subject: [bugfix] Fix comparing template name
......................................................................
[bugfix] Fix comparing template name
misspellingTemplate may be a tuple.
Check whether a template name is part of it.
Bug: T125328
Change-Id: I2e9a906ec90a01dec600d8dfa619bd61a5b38363
---
M scripts/misspelling.py
1 file changed, 5 insertions(+), 3 deletions(-)
Approvals:
Merlijn van Deen: Looks good to me, approved
jenkins-bot: Verified
diff --git a/scripts/misspelling.py b/scripts/misspelling.py
index 1a3aea1..29aa875 100755
--- a/scripts/misspelling.py
+++ b/scripts/misspelling.py
@@ -22,7 +22,7 @@
wikipedia, user, etc. namespaces.
"""
# (C) Daniel Herding, 2007
-# (C) Pywikibot team, 2007-2016
+# (C) Pywikibot team, 2007-2017
#
# Distributed under the terms of the MIT license.
#
@@ -128,9 +128,11 @@
self.alternatives.append(disambPage.getRedirectTarget().title())
return True
if self.misspellingTemplate.get(disambPage.site.code) is not None:
+ templates = self.misspellingTemplate[disambPage.site.code]
+ if isinstance(templates, basestring):
+ templates = (templates, )
for template, params in disambPage.templatesWithParams():
- if (template.title(withNamespace=False) ==
- self.misspellingTemplate[disambPage.site.code]):
+ if template.title(withNamespace=False) in templates:
# The correct spelling is in the last paramter.
correctSpelling = params[-1]
# On de.wikipedia, there are some cases where the
--
To view, visit https://gerrit.wikimedia.org/r/266062
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I2e9a906ec90a01dec600d8dfa619bd61a5b38363
Gerrit-PatchSet: 6
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: John Vandenberg <[email protected]>
Gerrit-Reviewer: Ladsgroup <[email protected]>
Gerrit-Reviewer: Magul <[email protected]>
Gerrit-Reviewer: Merlijn van Deen <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits