jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1022555?usp=email )
Change subject: Fix typos within docstrings ......................................................................
Fix typos within docstrings
Change-Id: I6b273f32a84efc7e63b646a969af9b06ee539cae --- M pywikibot/_wbtypes.py M pywikibot/page/_filepage.py M pywikibot/page/_wikibase.py M pywikibot/site/_generators.py M scripts/replace.py 5 files changed, 13 insertions(+), 12 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/_wbtypes.py b/pywikibot/_wbtypes.py index bbda021..868b7e6 100644 --- a/pywikibot/_wbtypes.py +++ b/pywikibot/_wbtypes.py @@ -698,7 +698,7 @@ *normalize* parameter was added. .. versionchanged:: 8.2 *normalize* parameter was removed due to :phab:`T340495` and - :phab:`57755` + :phab:`T57755`
:param force_iso: whether the output should be forced to ISO 8601 :return: Timestamp in a format resembling ISO 8601 @@ -739,7 +739,7 @@ *normalize* parameter was added. .. versionchanged:: 8.2 *normalize* parameter was removed due to :phab:`T340495` and - :phab:`57755` + :phab:`T57755`
:return: Wikibase JSON """ diff --git a/pywikibot/page/_filepage.py b/pywikibot/page/_filepage.py index 94dc98f..eaed3dd 100644 --- a/pywikibot/page/_filepage.py +++ b/pywikibot/page/_filepage.py @@ -433,9 +433,9 @@ """ Convenience function to get the associated Wikibase item of the file.
- If WikibaseMediaInfo extension is available (e.g. on Commons), + If WikibaseMediaInfo extension is available (e.g., on Commons), the method returns the associated mediainfo entity. Otherwise, - it falls back to behavior of BasePage.data_item. + it falls back to the behavior of :meth:`BasePage.data_item`.
.. versionadded:: 6.5
diff --git a/pywikibot/page/_wikibase.py b/pywikibot/page/_wikibase.py index c242b2c..1f9ed9a 100644 --- a/pywikibot/page/_wikibase.py +++ b/pywikibot/page/_wikibase.py @@ -84,9 +84,10 @@ Each entity is identified by a data repository it belongs to and an identifier.
- :cvar DATA_ATTRIBUTES: dictionary which maps data attributes (eg. 'labels', - 'claims') to appropriate collection classes (eg. LanguageDict, - ClaimsCollection) + :cvar DATA_ATTRIBUTES: dictionary which maps data attributes + (e.g., 'labels', 'claims') to appropriate collection classes + (e.g., :class:`LanguageDict<pywikibot.page._collections.LanguageDict>`, + :class:`ClaimCollection<pywikibot.page._collections.ClaimCollection>`)
:cvar entity_type: entity type identifier :type entity_type: str diff --git a/pywikibot/site/_generators.py b/pywikibot/site/_generators.py index 4b48de3..c695523 100644 --- a/pywikibot/site/_generators.py +++ b/pywikibot/site/_generators.py @@ -1001,7 +1001,7 @@ :ref:`Http Settings` in your ``user-config.py`` file. Or increase it patially within your code like:
- .. code:: pytkon + .. code:: python
from pywikibot import config save_timeout = config.socket_timeout # save the timeout config diff --git a/scripts/replace.py b/scripts/replace.py index 5a809f4..4f0303f 100755 --- a/scripts/replace.py +++ b/scripts/replace.py @@ -989,9 +989,9 @@ replacement = Replacement(old, new) if not single_summary: single_summary = i18n.twtranslate( - site, 'replace-replacing', - {'description': - f' (-{replacement.old} +{replacement.new})'} + site, + 'replace-replacing', + {'description': f' (-{replacement.old} +{replacement.new})'} ) replacements.append(replacement)
@@ -1013,7 +1013,7 @@ pywikibot.error( f'fixes[{fix_name!r}] is a {type(fix).__name__}, not a dict') if type(fix) is tuple: - pywikibot.info('Maybe a trailing comma in your user_fixes.py?') + pywikibot.info('Maybe a trailing comma in your user-fixes.py?') pywikibot.debug(fix) return