jenkins-bot submitted this change.

View Change

Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
[doc] fix doc string with duplicate string entries

Change-Id: I511426ed8120796f7c1da97bfad10fa423aeb302
---
M pywikibot/tools/_deprecate.py
1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/pywikibot/tools/_deprecate.py b/pywikibot/tools/_deprecate.py
index d8c56d3..9bbc133 100644
--- a/pywikibot/tools/_deprecate.py
+++ b/pywikibot/tools/_deprecate.py
@@ -174,7 +174,7 @@
`since`parameter must be a release number, not a timestamp.

:param instead: suggested replacement for the deprecated object
- :param since: a version string string when the method was deprecated
+ :param since: a version string when the method or function was deprecated
"""
if since and '.' not in since:
raise ValueError(f'{since} is not a valid release number')
@@ -204,7 +204,7 @@
:param depth: depth + 1 will be used as stacklevel for the warnings
:param warning_class: a warning class (category) to be used,
defaults to FutureWarning
- :param since: a version string string when the method was deprecated
+ :param since: a version string when the method or function was deprecated
"""
msg = _build_msg_string(instead, since)
if warning_class is None:
@@ -221,7 +221,7 @@

:keyword str instead: if provided, will be used to specify the
replacement
- :keyword str since: a version string string when the method was
+ :keyword str since: a version string when the method or function was
deprecated
:keyword bool future_warning: if True a FutureWarning will be thrown,
otherwise it provides a DeprecationWarning
@@ -525,7 +525,7 @@
new function.
:param class_name: The name of the class. It's added to the target and
source module (separated by a '.').
- :param since: a version string string when the method was deprecated
+ :param since: a version string when the method or function was deprecated
:param future_warning: if True a FutureWarning will be thrown,
otherwise it provides a DeprecationWarning
:return: A new function which adds a warning prior to each execution.
@@ -602,7 +602,8 @@
object name, and evaluated when the deprecated object is needed.
:param warning_message: The warning to display, with positional
variables: {0} = module, {1} = attribute name, {2} = replacement.
- :param since: a version string string when the method was deprecated
+ :param since: a version string when the method or function was
+ deprecated
:param future_warning: if True a FutureWarning will be thrown,
otherwise it provides a DeprecationWarning
"""

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

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I511426ed8120796f7c1da97bfad10fa423aeb302
Gerrit-Change-Number: 1033606
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info@gno.de>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged