jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1004674?usp=email )
Change subject: [doc] add some BaseSite methods to documentation which are delegated to family ...................................................................... [doc] add some BaseSite methods to documentation which are delegated to family Change-Id: I8c5e33429fcbf2cde4efb375fd989da2087543ac --- M docs/api_ref/pywikibot.site.rst M pywikibot/family.py 2 files changed, 77 insertions(+), 2 deletions(-) Approvals: jenkins-bot: Verified Xqt: Looks good to me, approved diff --git a/docs/api_ref/pywikibot.site.rst b/docs/api_ref/pywikibot.site.rst index ff43afc..1142f56 100644 --- a/docs/api_ref/pywikibot.site.rst +++ b/docs/api_ref/pywikibot.site.rst @@ -17,6 +17,72 @@ .. automodule:: pywikibot.site._basesite + .. autoclass:: BaseSite + + .. method:: linktrail() + + Return regex for trailing chars displayed as part of a link. + + .. note: Returns a string, not a compiled regular expression object. + .. seealso:: :meth:`family.Family.linktrail` + .. deprecated:: 7.3 + Only supported as :class:`APISite<pywikibot.site._apisite.APISite>` + method. Use :meth:`APISite.linktrail + <pywikibot.site._apisite.APISite.linktrail>` + + :rtype: str + + .. method:: category_redirects(fallback: str = '_default') + + Return list of category redirect templates. + + .. seealso:: :meth:`family.Family.category_redirects` + + :rtype: list[str] + + + .. method:: get_edit_restricted_templates() + + Return tuple of edit restricted templates. + + .. versionadded:: 3.0 + .. seealso:: :meth:`family.Family.get_edit_restricted_templates` + + :rtype: tuple[str, ...] + + + .. method:: get_archived_page_templates() + + Return tuple of edit restricted templates. + + .. versionadded:: 3.0 + .. seealso:: :meth:`family.Family.get_archived_page_templates` + + :rtype: tuple[str, ...] + + + .. method:: disambig(fallback: str = '_default') + + Return list of disambiguation templates. + + .. seealso:: :meth:`family.Family.disambig` + + + .. method:: protocol() + + The protocol to use to connect to the site. + + May be overridden to return 'http'. Other protocols are not + supported. + + .. versionchanged:: 8.2 + ``https`` is returned instead of ``http``. + .. seealso:: :meth:`family.Family.protocol` + + :param code: language code + :return: protocol that this family uses + + .. py:module:: site._apisite :synopsis: Objects representing API interface to MediaWiki site diff --git a/pywikibot/family.py b/pywikibot/family.py index cf48d4f..79042e7 100644 --- a/pywikibot/family.py +++ b/pywikibot/family.py @@ -399,7 +399,8 @@ def linktrail(self, code: str) -> str: """Return regex for trailing chars displayed as part of a link. - Returns a string, not a compiled regular expression object. + .. note:: Returns a string, not a compiled regular expression + object. .. deprecated:: 7.3 """ @@ -463,7 +464,6 @@ raise KeyError( f'ERROR: title for disambig template in language {code} unknown') - # Methods def protocol(self, code: str) -> str: """The protocol to use to connect to the site. -- To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1004674?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.wikimedia.org/r/settings Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Change-Id: I8c5e33429fcbf2cde4efb375fd989da2087543ac Gerrit-Change-Number: 1004674 Gerrit-PatchSet: 5 Gerrit-Owner: Xqt <i...@gno.de> Gerrit-Reviewer: Xqt <i...@gno.de> Gerrit-Reviewer: jenkins-bot Gerrit-MessageType: merged
_______________________________________________ Pywikibot-commits mailing list -- pywikibot-commits@lists.wikimedia.org To unsubscribe send an email to pywikibot-commits-le...@lists.wikimedia.org