Xqt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/351776 )

Change subject: [PEP8] keep line lenght below 80 chars
......................................................................

[PEP8] keep line lenght below 80 chars

Change-Id: I3eb06f004817f2202d04c60c84786a8981e11c16
---
M pywikibot/bot.py
1 file changed, 23 insertions(+), 20 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/76/351776/1

diff --git a/pywikibot/bot.py b/pywikibot/bot.py
index edd32d1..7799274 100644
--- a/pywikibot/bot.py
+++ b/pywikibot/bot.py
@@ -27,8 +27,8 @@
 use C{treat_page} instead of C{treat} and C{put_current} instead of C{userPut}.
 It by default subclasses the C{BaseBot} class.
 
-With L{CurrentPageBot} it's possible to subclass one of the following classes 
to
-filter the pages which are ultimately handled by C{treat_page}:
+With L{CurrentPageBot} it's possible to subclass one of the following classes
+to filter the pages which are ultimately handled by C{treat_page}:
 
 * L{ExistingPageBot}: Only handle pages which do exist.
 * L{CreatingPageBot}: Only handle pages which do not exist.
@@ -39,9 +39,9 @@
 
 It is possible to combine filters by subclassing multiple of them. They are
 new-style classes so when a class is first subclassing L{ExistingPageBot} and
-then L{FollowRedirectPageBot} it will also work on pages which do not exist 
when
-a redirect pointed to that. If the order is inversed it'll first follow them 
and
-then check whether they exist.
+then L{FollowRedirectPageBot} it will also work on pages which do not exist
+when a redirect pointed to that. If the order is inversed it'll first follow
+them and then check whether they exist.
 
 Additionally there is the L{AutomaticTWSummaryBot} which subclasses
 L{CurrentPageBot} and automatically defines the summary when C{put_current} is
@@ -120,7 +120,8 @@
     'Choice', 'AlwaysChoice',
     'QuitKeyboardInterrupt',
     'InteractiveReplace',
-    'calledModuleName', 'handle_args', 'handleArgs', 'showHelp', 
'suggest_help',
+    'calledModuleName', 'handle_args', 'handleArgs',
+    'showHelp', 'suggest_help',
     'writeToCommandLogFile', 'open_webbrowser',
     'OptionHandler',
     'BaseBot', 'Bot', 'SingleSiteBot', 'MultipleSitesBot',
@@ -374,9 +375,10 @@
         ver = version.get_module_version(module)
         mtime = version.get_module_mtime(module)
         if filename and ver and mtime:
-            # it's explicitly using str() to bypass unicode_literals in Python 
2
+            # it's explicitly using str() to bypass unicode_literals in py2
             # isoformat expects a char not a unicode in Python 2
-            log(u'  {0} {1} {2}'.format(filename, ver[:7], 
mtime.isoformat(str(' '))))
+            log(u'  {0} {1} {2}'.format(filename, ver[:7],
+                                        mtime.isoformat(str(' '))))
 
     if config.log_pywiki_repo_version:
         log(u'PYWIKI REPO VERSION: %s' % version.getversion_onlinerepo())
@@ -495,8 +497,8 @@
     @param answers: a list of strings that represent the options.
     @type answers: list of basestring
     @param hotkeys: a list of one-letter strings, one for each answer.
-    @param default: an element of hotkeys, or None. The default choice that 
will
-                 be returned when the user just presses Enter.
+    @param default: an element of hotkeys, or None. The default choice that
+        will be returned when the user just presses Enter.
     @return: a one-letter string in lowercase.
     @rtype: str
     """
@@ -598,7 +600,8 @@
             if self.replacer.current_link.anchor is None:
                 kwargs['label'] = self.replacer.current_groups['title']
                 if self.replacer.current_groups['section']:
-                    kwargs['label'] += '#' + 
self.replacer.current_groups['section']
+                    kwargs['label'] += '#' + \
+                                       self.replacer.current_groups['section']
             else:
                 kwargs['label'] = self.replacer.current_link.anchor
         return pywikibot.Link.create_separated(
@@ -650,9 +653,9 @@
     option to increase C{context} by the given amount each time the option is
     selected.
 
-    Additional choices can be defined using the 'additional_choices' and will 
be
-    amended to the choices defined by this class. This list is mutable and the
-    Choice instance returned and created by this class are too.
+    Additional choices can be defined using the 'additional_choices' and will
+    be amended to the choices defined by this class. This list is mutable and
+    the Choice instance returned and created by this class are too.
     """
 
     def __init__(self, old_link, new_link, default=None, automatic_quit=True):
@@ -664,8 +667,8 @@
         @type old_link: Link or Page
         @param new_link: The new link with which it should be replaced.
             Depending on the replacement mode it'll use this link's label and
-            section. If False it'll unlink all and the attributes beginning 
with
-            allow_replace are ignored.
+            section. If False it'll unlink all and the attributes beginning
+            with allow_replace are ignored.
         @type new_link: Link or Page or False
         @param default: The default answer as the shortcut
         @type default: None or str
@@ -701,8 +704,8 @@
             self._own_choices += [
                 ('replace', LinkChoice('Change link target', 't', self,
                                        False, False)),
-                ('replace_section', LinkChoice('Change link target and 
section',
-                                               's', self, True, False)),
+                ('replace_section', LinkChoice(
+                    'Change link target and section', 's', self, True, False)),
                 ('replace_label', LinkChoice('Change link target and label',
                                              'l', self, False, True)),
                 ('replace_all', LinkChoice('Change complete link', 'c', self,
@@ -858,8 +861,8 @@
         # not the one in pywikibot.bot.
         args = pywikibot.argvu[1:]
     # get the name of the module calling this function. This is
-    # required because the -help option loads the module's docstring and 
because
-    # the module name will be used for the filename of the log.
+    # required because the -help option loads the module's docstring and
+    # because the module name will be used for the filename of the log.
     moduleName = calledModuleName()
     if not moduleName:
         moduleName = "terminal-interface"

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3eb06f004817f2202d04c60c84786a8981e11c16
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to