Xqt has submitted this change. ( 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1285542?usp=email )

Change subject: doc: fix spelling mistakes and update docstrings
......................................................................

doc: fix spelling mistakes and update docstrings

Change-Id: Iaccc2176722679b5782eac770d9b672b5ff32128
---
M scripts/add_text.py
M scripts/interwiki.py
2 files changed, 12 insertions(+), 9 deletions(-)

Approvals:
  Xqt: Verified; Looks good to me, approved




diff --git a/scripts/add_text.py b/scripts/add_text.py
index d92baad..c37ddbb 100755
--- a/scripts/add_text.py
+++ b/scripts/add_text.py
@@ -132,7 +132,7 @@
             self.generator = pagegenerators.PageWithTalkPageGenerator(
                 self.generator, return_talk_only=True)

-    def skip_page(self, page):
+    def skip_page(self, page: pywikibot.Page) -> bool:
         """Skip if -exceptUrl matches or page does not exists."""
         if page.exists():
             if self.opt.createonly:
diff --git a/scripts/interwiki.py b/scripts/interwiki.py
index 4b4853e..61de202 100755
--- a/scripts/interwiki.py
+++ b/scripts/interwiki.py
@@ -16,7 +16,7 @@

 .. hint:: This script should not be used for wiki farms having a data
    repository like Wikidata for Wikimedia cluster. Possibly use the
-   :mod:``scripts.interwikidata`` script for similar purpose in such
+   :mod:`scripts.interwikidata` script for similar purpose in such
    environments.

 These command-line arguments can be used to specify which pages to work
@@ -495,10 +495,14 @@
     graph = config.interwiki_graph

     def note(self, text: str) -> None:
-        """Output a notification message with.
+        """Output a notification message.

-        The text will be printed only if conf.quiet isn't set.
-        :param text: text to be shown
+        The text will be printed only if :attr:`conf.quiet<quiet>` isn't
+        set.
+
+        .. version-added:: 3.0.20200111
+
+        :param text: Text to be shown.
         """
         if not self.quiet:
             pywikibot.info('NOTE: ' + text)
@@ -1075,7 +1079,7 @@
     def redir_checked(self, page, counter) -> bool:
         """Check and handle redirect.

-        Return True if check is done.
+        :return: True if check is done, else False.
         """
         if page.isRedirectPage():
             redirect_target = page.getRedirectTarget()
@@ -1088,7 +1092,7 @@

         self.conf.note(f'{page} is {redir}redirect to {redirect_target}')
         if self.origin is None or page == self.origin:
-            # the 1st existig page becomes the origin page, if none was
+            # the 1st existing page becomes the origin page, if none was
             # supplied
             if self.conf.initialredirect:
                 # don't follow another redirect; it might be a self
@@ -1687,8 +1691,7 @@
         newtext = textlib.replaceLanguageLinks(oldtext, new,
                                                site=page.site,
                                                template=template)
-        # This is for now. Later there should be different funktions for each
-        # kind
+
         if not botMayEdit(page):
             pywikibot.info(f'SKIPPING: {page} ', newline=False)
             if template:

--
To view, visit 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1285542?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.wikimedia.org/r/settings?usp=email

Gerrit-MessageType: merged
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: Iaccc2176722679b5782eac770d9b672b5ff32128
Gerrit-Change-Number: 1285542
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to