jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/418735 )

Change subject: [IMPR] expand tuple at once
......................................................................

[IMPR] expand tuple at once

Change-Id: I62dba26a5569648ba188334dc6b2029f9d88aec9
---
M pywikibot/__init__.py
M pywikibot/cosmetic_changes.py
M pywikibot/version.py
3 files changed, 6 insertions(+), 8 deletions(-)

Approvals:
  Dalba: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/pywikibot/__init__.py b/pywikibot/__init__.py
index a363725..938cf59 100644
--- a/pywikibot/__init__.py
+++ b/pywikibot/__init__.py
@@ -1230,8 +1230,7 @@

         cached = _url_cache[url]
         if cached:
-            code = cached[0]
-            fam = cached[1]
+            code, fam = cached
         else:
             raise SiteDefinitionError("Unknown URL '{0}'.".format(url))
     else:
diff --git a/pywikibot/cosmetic_changes.py b/pywikibot/cosmetic_changes.py
index f9488c2..5c873d0 100755
--- a/pywikibot/cosmetic_changes.py
+++ b/pywikibot/cosmetic_changes.py
@@ -705,8 +705,7 @@
            self.site.code in deprecatedTemplates[self.site.family.name]:
             for template in deprecatedTemplates[
                     self.site.family.name][self.site.code]:
-                old = template[0]
-                new = template[1]
+                old, new = template
                 if new is None:
                     new = ''
                 else:
diff --git a/pywikibot/version.py b/pywikibot/version.py
index 956a2f0..e671c90 100644
--- a/pywikibot/version.py
+++ b/pywikibot/version.py
@@ -2,8 +2,8 @@
 """Module to determine the pywikibot version (tag, revision and date)."""
 #
 # (C) Merlijn 'valhallasw' van Deen, 2007-2014
-# (C) xqt, 2010-2016
-# (C) Pywikibot team, 2007-2016
+# (C) xqt, 2010-2018
+# (C) Pywikibot team, 2007-2018
 #
 # Distributed under the terms of the MIT license.
 #
@@ -165,10 +165,10 @@
                 for i in range(3):
                     entries.readline()
                 tag = entries.readline().strip()
-                t = tag.split('://')
+                t = tag.split('://', 1)
                 t[1] = t[1].replace('svn.wikimedia.org/svnroot/pywikipedia/',
                                     '')
-                tag = '[%s] %s' % (t[0], t[1])
+                tag = '[{0}] {1}'.format(*t)
                 for i in range(4):
                     entries.readline()
                 date = time.strptime(entries.readline()[:19],

--
To view, visit https://gerrit.wikimedia.org/r/418735
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I62dba26a5569648ba188334dc6b2029f9d88aec9
Gerrit-Change-Number: 418735
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <i...@gno.de>
Gerrit-Reviewer: Dalba <dalba.w...@gmail.com>
Gerrit-Reviewer: John Vandenberg <jay...@gmail.com>
Gerrit-Reviewer: Zoranzoki21 <zorandori4...@gmail.com>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
Pywikibot-commits mailing list
Pywikibot-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits

Reply via email to