jenkins-bot has submitted this change. ( 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1224753?usp=email )

Change subject: Fix Docsig's SIG402 issues
......................................................................

Fix Docsig's SIG402 issues

Bug: T413960
Change-Id: Id177c3c22c8e35e206de178f2c351adbfae876a5
---
M pyproject.toml
M pywikibot/page/_basepage.py
M pywikibot/pagegenerators/_generators.py
M pywikibot/site/_apisite.py
M pywikibot/site/_datasite.py
M pywikibot/site/_generators.py
M pywikibot/tools/__init__.py
7 files changed, 28 insertions(+), 28 deletions(-)

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




diff --git a/pyproject.toml b/pyproject.toml
index 37a2d06..a678cdf 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -166,7 +166,6 @@
     "SIG203",
     "SIG301",
     "SIG305",
-    "SIG402",
     "SIG501",
     "SIG503",
     "SIG505",
diff --git a/pywikibot/page/_basepage.py b/pywikibot/page/_basepage.py
index db6cacd..e1bf8f1 100644
--- a/pywikibot/page/_basepage.py
+++ b/pywikibot/page/_basepage.py
@@ -1,6 +1,6 @@
 """Objects representing a base object for a MediaWiki page."""
 #
-# (C) Pywikibot team, 2008-2025
+# (C) Pywikibot team, 2008-2026
 #
 # Distributed under the terms of the MIT license.
 #
@@ -2055,13 +2055,13 @@

         :param reason: The edit summary for the deletion, or rationale
             for deletion if requesting. If None, ask for it.
-        :param deletetalk: Also delete the talk page, if it exists.
         :param prompt: If true, prompt user for confirmation before deleting.
         :param mark: If true, and user does not have sysop rights, place a
             speedy-deletion request on the page instead. If false, non-sysops
             will be asked before marking pages for deletion.
         :param automatic_quit: show also the quit option, when asking
             for confirmation.
+        :param deletetalk: Also delete the talk page, if it exists.

         :return: the function returns an integer, with values as follows:
             value    meaning
@@ -2283,6 +2283,8 @@
              <pywikibot.site._apisite.APISite.protect>`
            - :meth:`applicable_protections`

+        :param reason: Reason for the action, default is None and will
+            set an empty string.
         :param protections: A dict mapping type of protection to
             protection level of that type. Allowed protection types for
             a page can be retrieved by :meth:`applicable_protections`.
@@ -2291,8 +2293,6 @@

             Example: :code:`{'move': 'sysop', 'edit': 'autoconfirmed'}`

-        :param reason: Reason for the action, default is None and will
-            set an empty string.
         """
         protections = protections or {}  # protections is converted to {}
         reason = reason or ''  # None is converted to ''
diff --git a/pywikibot/pagegenerators/_generators.py 
b/pywikibot/pagegenerators/_generators.py
index 6286bca..f51afb9 100644
--- a/pywikibot/pagegenerators/_generators.py
+++ b/pywikibot/pagegenerators/_generators.py
@@ -1,6 +1,6 @@
 """Page filter generators provided by the pagegenerators module."""
 #
-# (C) Pywikibot team, 2008-2025
+# (C) Pywikibot team, 2008-2026
 #
 # Distributed under the terms of the MIT license.
 #
@@ -508,9 +508,10 @@
                                ) -> Iterable[pywikibot.page.Page]:
     """Yield unique pages edited by user:username.

-    :param total: Maximum number of pages to retrieve in total
+    :param username: user name
     :param namespaces: list of namespace numbers to fetch contribs from
     :param site: Site for generator results.
+    :param total: Maximum number of pages to retrieve in total
     """
     if site is None:
         site = pywikibot.Site()
diff --git a/pywikibot/site/_apisite.py b/pywikibot/site/_apisite.py
index bbe13aa..8bc880d 100644
--- a/pywikibot/site/_apisite.py
+++ b/pywikibot/site/_apisite.py
@@ -1,6 +1,6 @@
 """Objects representing API interface to MediaWiki site."""
 #
-# (C) Pywikibot team, 2008-2025
+# (C) Pywikibot team, 2008-2026
 #
 # Distributed under the terms of the MIT license.
 #
@@ -2009,6 +2009,8 @@
         :param minor: if True (default), mark edit as minor
         :param notminor: if True, override account preferences to mark
             edit as non-minor
+        :param bot: if True and bot right is given, mark edit with bot
+            flag
         :param recreate: if True (default), create new page even if this
             title has previously been deleted
         :param createonly: if True, raise an error if this title already
@@ -2025,8 +2027,6 @@
             * nochange --- don't change the watchlist

             If None (default), follow bot account's default settings
-        :param bot: if True and bot right is given, mark edit with bot
-            flag

         :keyword str text: Overrides Page.text
         :keyword int | str section: Edit an existing numbered section or
@@ -3073,14 +3073,14 @@
         """Purge the server's cache for one or multiple pages.

         :param pages: list of Page objects
-        :param redirects: Automatically resolve redirects.
-        :param converttitles: Convert titles to other variants if
-            necessary. Only works if the wiki's content language
-            supports variant conversion.
         :param forcelinkupdate: Update the links tables.
         :param forcerecursivelinkupdate: Update the links table, and
             update the links tables for any page that uses this page as
             a template.
+        :param converttitles: Convert titles to other variants if
+            necessary. Only works if the wiki's content language
+            supports variant conversion.
+        :param redirects: Automatically resolve redirects.
         :return: True if API returned expected response; False otherwise
         """
         req = self.simple_request(action='purge', titles=list(set(pages)))
diff --git a/pywikibot/site/_datasite.py b/pywikibot/site/_datasite.py
index 7b66e93..3d99e55 100644
--- a/pywikibot/site/_datasite.py
+++ b/pywikibot/site/_datasite.py
@@ -442,8 +442,8 @@
            *tags* parameter was added
 
         :param claim: The claim to save
-        :param bot: Whether to mark the edit as a bot edit
         :param summary: Edit summary
+        :param bot: Whether to mark the edit as a bot edit
         :param tags: Change tags to apply to the revision
         :raises NoPageError: missing the the snak value
         :raises NotImplementedError: ``claim.isReference`` or
@@ -782,10 +782,10 @@
     def set_redirect_target(self, from_item, to_item, bot: bool = True):
         """Make a redirect to another item.

-        :param to_item: Title of target item.
-        :type to_item: pywikibot.ItemPage
         :param from_item: Title of the item to be redirected.
         :type from_item: pywikibot.ItemPage
+        :param to_item: Title of target item.
+        :type to_item: pywikibot.ItemPage
         :param bot: Whether to mark the edit as a bot edit
         """
         params = {
diff --git a/pywikibot/site/_generators.py b/pywikibot/site/_generators.py
index 8b15ad1..7ad4230 100644
--- a/pywikibot/site/_generators.py
+++ b/pywikibot/site/_generators.py
@@ -1,6 +1,6 @@
 """Objects representing API generators to MediaWiki site."""
 #
-# (C) Pywikibot team, 2008-2025
+# (C) Pywikibot team, 2008-2026
 #
 # Distributed under the terms of the MIT license.
 #
@@ -1253,10 +1253,10 @@
         :param url: The URL to search for (with or without the protocol
             prefix); this may include a '*' as a wildcard, only at the start
             of the hostname
-        :param namespaces: list of namespace numbers to fetch contribs from
-        :param total: Maximum number of pages to retrieve in total
         :param protocol: protocol to search for, http and https by default.
                 Full list shown on Special:LinkSearch wikipage
+        :param namespaces: list of namespace numbers to fetch contribs from
+        :param total: Maximum number of pages to retrieve in total
         """
         if url is not None:
             found_protocol, _, url = url.rpartition('://')
@@ -1695,15 +1695,15 @@
         .. seealso:: :api:`Deletedrevisions`

         :param titles: The page titles to check for deleted revisions
-        :keyword revids: Get revisions by their ID
-
-        .. note:: either titles or revids must be set but not both
-
         :param start: Iterate revisions starting at this Timestamp
         :param end: Iterate revisions ending at this Timestamp
         :param reverse: Iterate oldest revisions first (default: newest)
         :param content: If True, retrieve the content of each revision
         :param total: number of revisions to retrieve
+        :keyword revids: Get revisions by their ID
+
+        .. note:: either titles or revids must be set but not both
+
         :keyword user: List revisions by this user
         :keyword excludeuser: Exclude revisions by this user
         :keyword tag: Only list revision tagged with this tag
diff --git a/pywikibot/tools/__init__.py b/pywikibot/tools/__init__.py
index 9ad6b55..bdced85 100644
--- a/pywikibot/tools/__init__.py
+++ b/pywikibot/tools/__init__.py
@@ -1,6 +1,6 @@
 """Miscellaneous helper functions (not wiki-dependent)."""
 #
-# (C) Pywikibot team, 2008-2025
+# (C) Pywikibot team, 2008-2026
 #
 # Distributed under the terms of the MIT license.
 #
@@ -556,12 +556,12 @@
     .. versionadded:: 3.0

     :param filename: The filename.
-    :param use_extension: Use the file extension instead of the magic
-        number to determine the type of compression (default True). Must
-        be True when writing or appending.
     :param mode: The mode in which the file should be opened. It may
         either be 'r', 'rb', 'a', 'ab', 'w' or 'wb'. All modes open the
         file in binary mode. It defaults to 'rb'.
+    :param use_extension: Use the file extension instead of the magic
+        number to determine the type of compression (default True). Must
+        be True when writing or appending.
     :raises ValueError: When 7za is not available or the opening mode is
         unknown or it tries to write a 7z archive.
     :raises FileNotFoundError: When the filename doesn't exist and it

--
To view, visit 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1224753?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: Id177c3c22c8e35e206de178f2c351adbfae876a5
Gerrit-Change-Number: 1224753
Gerrit-PatchSet: 2
Gerrit-Owner: Sanjai Siddharthan <[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