Xqt submitted this change.

View Change

Approvals: jenkins-bot: Verified Xqt: Looks good to me, approved
[doc] Fix version hints

Change-Id: I34402143b7948715e53a8b7cec1f0fc13f7ecff1
---
M pywikibot/site/_siteinfo.py
M pywikibot/time.py
M pywikibot/tools/__init__.py
M pywikibot/tools/itertools.py
M scripts/checkimages.py
5 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/pywikibot/site/_siteinfo.py b/pywikibot/site/_siteinfo.py
index 4c1ab93..3e3afac 100644
--- a/pywikibot/site/_siteinfo.py
+++ b/pywikibot/site/_siteinfo.py
@@ -63,7 +63,7 @@
def clear(self) -> None:
"""Remove all items from Siteinfo.

- .. versionadded: 7.1
+ .. versionadded:: 7.1
"""
self._cache.clear()

diff --git a/pywikibot/time.py b/pywikibot/time.py
index 14f5371..cf90546 100644
--- a/pywikibot/time.py
+++ b/pywikibot/time.py
@@ -79,7 +79,7 @@
- ISO8601 format: YYYY-MM-DD[T ]HH:MM:SS[Z|±HH[MM[SS[.ffffff]]]]
- POSIX format: seconds from Unix epoch S{1,13}[.ffffff]]

- .. versionadded: 7.5
+ .. versionadded:: 7.5

:param ts: Timestamp, datetime.datetime or str
:return: Timestamp object
@@ -98,7 +98,7 @@
def _from_datetime(dt: datetime.datetime) -> 'Timestamp':
"""Convert a datetime.datetime timestamp to a Timestamp object.

- .. versionadded: 7.5
+ .. versionadded:: 7.5
"""
return Timestamp(dt.year, dt.month, dt.day, dt.hour,
dt.minute, dt.second, dt.microsecond,
@@ -110,7 +110,7 @@

Mediwiki timestamp format: YYYYMMDDHHMMSS

- .. versionadded: 7.5
+ .. versionadded:: 7.5
"""
RE_MW = r'\d{14}$' # noqa: N806
m = re.match(RE_MW, timestr)
@@ -128,7 +128,7 @@
ISO8601 format:
- YYYY-MM-DD[T ]HH:MM:SS[[.,]ffffff][Z|±HH[MM[SS[.ffffff]]]]

- .. versionadded: 7.5
+ .. versionadded:: 7.5
"""
RE_ISO8601 = (r'(?:\d{4}-\d{2}-\d{2})(?P<sep>[T ])' # noqa: N806
r'(?:\d{2}:\d{2}:\d{2})(?P<u>[.,]\d{1,6})?'
@@ -170,7 +170,7 @@

POSIX format: SECONDS[.ffffff]]

- .. versionadded: 7.5
+ .. versionadded:: 7.5
"""
RE_POSIX = r'(?P<S>-?\d{1,13})(?:\.(?P<u>\d{1,6}))?$' # noqa: N806
m = re.match(RE_POSIX, timestr)
@@ -194,7 +194,7 @@
def _from_string(cls: Type['Timestamp'], timestr: str) -> 'Timestamp':
"""Convert a string to a Timestamp object.

- .. versionadded: 7.5
+ .. versionadded:: 7.5
"""
handlers = [
cls._from_mw,
@@ -280,14 +280,14 @@

See Note in datetime.timestamp().

- .. versionadded: 7.5
+ .. versionadded:: 7.5
"""
return self.replace(tzinfo=datetime.timezone.utc).timestamp()

def posix_timestamp_format(self) -> str:
"""Convert object to a POSIX timestamp format.

- .. versionadded: 7.5
+ .. versionadded:: 7.5
"""
return f'{self.posix_timestamp():.6f}'

diff --git a/pywikibot/tools/__init__.py b/pywikibot/tools/__init__.py
index 72ce89b..f59c46e 100644
--- a/pywikibot/tools/__init__.py
+++ b/pywikibot/tools/__init__.py
@@ -602,7 +602,7 @@
The positional arguments are the dictionaries to be merged. It is also
possible to define an additional dict using the keyword arguments.

- .. versionadded: 3.0
+ .. versionadded:: 3.0
"""
args = list(args) + [dict(kwargs)]
conflicts = set()
@@ -625,7 +625,7 @@
):
"""Check file mode and update it, if needed.

- .. versionadded: 3.0
+ .. versionadded:: 3.0

:param filename: filename path
:param mode: requested file mode
@@ -654,7 +654,7 @@

Result is expressed as hexdigest().

- .. versionadded: 3.0
+ .. versionadded:: 3.0

:param filename: filename path
:param sha: hashing function among the following in hashlib:
diff --git a/pywikibot/tools/itertools.py b/pywikibot/tools/itertools.py
index 7d8547d..50fb740 100644
--- a/pywikibot/tools/itertools.py
+++ b/pywikibot/tools/itertools.py
@@ -259,7 +259,7 @@

.. warning:: This is not thread safe.

- .. versionadded: 3.0
+ .. versionadded:: 3.0

:param iterable: the source iterable
:type iterable: collections.abc.Iterable
diff --git a/scripts/checkimages.py b/scripts/checkimages.py
index d0fc38b..49c3985 100755
--- a/scripts/checkimages.py
+++ b/scripts/checkimages.py
@@ -791,7 +791,7 @@
"""
Get tuples of image and time, return the most used or oldest image.

- .. versionchanged: 7.2
+ .. versionchanged:: 7.2
itertools.zip_longest is used to stop `using_pages` as soon as
possible.


To view, visit change 854869. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I34402143b7948715e53a8b7cec1f0fc13f7ecff1
Gerrit-Change-Number: 854869
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info@gno.de>
Gerrit-Reviewer: D3r1ck01 <xsavitar.wiki@aol.com>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged