Skip to content

Commit

Permalink
[IMPR] remove hints for MediaWiki < 1.27
Browse files Browse the repository at this point in the history
Bug: T306637
Change-Id: I403f3a3cd245d7f3775b99799e93ec39efe0e314
  • Loading branch information
xqt committed Aug 26, 2023
1 parent 10596df commit f981b72
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pywikibot/login.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ def login_to_site(self) -> None:

@deprecated("site.tokens['login']", since='8.0.0')
def get_login_token(self) -> Optional[str]:
"""Fetch login token for MediaWiki 1.27+.
"""Fetch login token.
.. deprecated:: 8.0
Expand Down
12 changes: 6 additions & 6 deletions pywikibot/site/_generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -1709,7 +1709,7 @@ def users(self, usernames):
'ususers': usernames, 'usprop': usprop})
return usgen

def randompages(self, total=None, namespaces=None,
def randompages(self, total: Optional[int] = None, namespaces=None,
redirects: Optional[bool] = False, content: bool = False):
"""Iterate a number of random pages.
Expand All @@ -1723,11 +1723,11 @@ def randompages(self, total=None, namespaces=None,
:type namespaces: iterable of str or Namespace key,
or a single instance of those types. May be a '|' separated
list of namespace identifiers.
:param redirects: if True, include only redirect pages in results,
False does not include redirects and None (MW 1.26+) include both
types. (default: False)
:param content: if True, load the current content of each iterated page
(default False)
:param redirects: if True, include only redirect pages in
results, False does not include redirects and None include
both types (default: False).
:param content: if True, load the current content of each
iterated page (default False).
:raises KeyError: a namespace identifier was not resolved
:raises TypeError: a namespace identifier has an inappropriate
type such as NoneType or bool
Expand Down

0 comments on commit f981b72

Please sign in to comment.