jenkins-bot has submitted this change and it was merged.
Change subject: replace both with site.code: .lang and .language() ......................................................................
replace both with site.code: .lang and .language()
Change-Id: I75c9cea3827a18dfc0d71f838934c49e2c81aa98 --- M scripts/maintenance/compat2core.py 1 file changed, 2 insertions(+), 2 deletions(-)
Approvals: John Vandenberg: Looks good to me, but someone else must approve Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/maintenance/compat2core.py b/scripts/maintenance/compat2core.py index fe5af47..a6a0c0c 100644 --- a/scripts/maintenance/compat2core.py +++ b/scripts/maintenance/compat2core.py @@ -56,8 +56,8 @@ ('(?<!.)wikipedia.', u'pywikibot.'), # site instance call ('pywikibot.getSite\s*(\s*', 'pywikibot.Site('), - # lang is differen from code. We should use code in core - ('([Ss])ite.lang(\W*)', r'\1ite.code\2'), + # lang is different from code. We should use code in core + ('([Ss])ite.lang(?:uage())?', r'\1ite.code'), # change compat library classes to pywikibot intrinsic classes ('catlib.Category\s*(\s*', 'pywikibot.Category('), ('catlib.change_category\s*((\s*)(?P<article>.+?),\s*(?P<oldcat>.+?),',
pywikibot-commits@lists.wikimedia.org