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

Change subject: [cleanup] use site.mw_version instead of 
MediaWikiVersion(site.version())
......................................................................

[cleanup] use site.mw_version instead of MediaWikiVersion(site.version())

Change-Id: I2ab5b1b40d4542cc0b1a6d7ae56576067f0f3c95
---
M pywikibot/data/api.py
1 file changed, 6 insertions(+), 9 deletions(-)

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



diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py
index 64223ce..9995a9c 100644
--- a/pywikibot/data/api.py
+++ b/pywikibot/data/api.py
@@ -38,7 +38,7 @@
     Error, TimeoutError, InvalidTitle, UnsupportedPage
 )
 from pywikibot.tools import (
-    MediaWikiVersion, deprecated, itergroup, ip, PY2, PYTHON_VERSION,
+    deprecated, itergroup, ip, PY2, PYTHON_VERSION,
     getargspec, UnicodeType, remove_last_args
 )
 from pywikibot.tools.formatter import color_format
@@ -366,7 +366,7 @@
             ],
         }

-        if _mw_ver >= MediaWikiVersion('1.12'):
+        if _mw_ver >= '1.12':
             return

         query_help_list_prefix = "Values (separate with '|'): "
@@ -1692,14 +1692,11 @@
             # When neither 'continue' nor 'rawcontinue' is present and the
             # version number is at least 1.25wmf5 we add a dummy rawcontinue
             # parameter. Querying siteinfo is save as it adds 'continue'.
-            if ('continue' not in self._params and
-                    'rawcontinue' not in self._params and
-                    MediaWikiVersion(
-                        self.site.version()) >= MediaWikiVersion('1.25wmf5')):
+            if ('continue' not in self._params
+                and 'rawcontinue' not in self._params
+                    and self.site.mw_version >= '1.25wmf5'):
                 self._params['rawcontinue'] = ['']
-        elif (self.action == 'help'
-                and MediaWikiVersion(self.site.version())
-                > MediaWikiVersion('1.24')):
+        elif self.action == 'help' and self.site.mw_version > '1.24':
             self._params['wrap'] = ['']

         if 'maxlag' not in self._params and config.maxlag:

--
To view, visit https://gerrit.wikimedia.org/r/477172
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.wikimedia.org/r/settings

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I2ab5b1b40d4542cc0b1a6d7ae56576067f0f3c95
Gerrit-Change-Number: 477172
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Dalba <[email protected]>
Gerrit-Reviewer: John Vandenberg <[email protected]>
Gerrit-Reviewer: jenkins-bot (75)
_______________________________________________
Pywikibot-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits

Reply via email to