jenkins-bot has submitted this change. ( 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1043068?usp=email )

Change subject: [doc] prevent multiple entries in Sphinx documentation
......................................................................

[doc] prevent multiple entries in Sphinx documentation

Some classes and functions of i18n, logging, page and time modules are
imported in pywikibot and can also be used as pywikibot members. Remove
the documentation from pywikibot and add a reference to bot module for
them.

Change-Id: I391e057eaf368b3a01e6c7df96f2ae3dd95e4e49
---
M docs/api_ref/bot.rst
M docs/api_ref/date_time.rst
M docs/api_ref/i18n.rst
M docs/api_ref/logging.rst
M docs/api_ref/pywikibot.page.rst
M docs/api_ref/pywikibot.rst
6 files changed, 122 insertions(+), 9 deletions(-)

Approvals:
  Xqt: Looks good to me, approved
  jenkins-bot: Verified




diff --git a/docs/api_ref/bot.rst b/docs/api_ref/bot.rst
index 2e17aa9..ce8117d 100644
--- a/docs/api_ref/bot.rst
+++ b/docs/api_ref/bot.rst
@@ -7,6 +7,7 @@
    :member-order: bysource

    .. admonition:: Imports in :mod:`pywikibot` module
+      :class: note

       The following classes and functions are inported in :mod:`pywikibot`
       module and can also be used as :mod:`pywikibot` members:
diff --git a/docs/api_ref/date_time.rst b/docs/api_ref/date_time.rst
index 7741b6e..f6c65d8 100644
--- a/docs/api_ref/date_time.rst
+++ b/docs/api_ref/date_time.rst
@@ -3,3 +3,11 @@
 ******************************************

 .. automodule:: pywikibot.time
+
+   .. admonition:: Imports in :mod:`pywikibot` module
+      :class: note
+
+      The following class is imported in :mod:`time<pywikibot.time>` module but
+      can also be used as :mod:`pywikibot` members:
+
+      - :class:`pywikibot.Timestamp<pywikibot.time.Timestamp>`
diff --git a/docs/api_ref/i18n.rst b/docs/api_ref/i18n.rst
index 9b41287..f682e73 100644
--- a/docs/api_ref/i18n.rst
+++ b/docs/api_ref/i18n.rst
@@ -3,4 +3,12 @@
 ****************************

 .. automodule:: i18n
-   :synopsis: Various i18n functions
\ No newline at end of file
+   :synopsis: Various i18n functions
+
+   .. admonition:: Imports in :mod:`pywikibot` module
+      :class: note
+
+      The following function is inported in :mod:`pywikibot` module but can 
also
+      be used as :mod:`pywikibot` members:
+
+      - :class:`pywikibot.translate()<i18n.translate>`
diff --git a/docs/api_ref/logging.rst b/docs/api_ref/logging.rst
index 842c542..1266f2e 100644
--- a/docs/api_ref/logging.rst
+++ b/docs/api_ref/logging.rst
@@ -7,3 +7,19 @@

 .. automodule:: pywikibot.logging
    :member-order: bysource
+
+   .. admonition:: Imports in :mod:`pywikibot` module
+      :class: note
+
+      The following functions are inported in :mod:`pywikibot` module and can
+      also be used as :mod:`pywikibot` members:
+
+      - :func:`pywikibot.critical()<pywikibot.logging.critical>`
+      - :func:`pywikibot.debug()<pywikibot.logging.debug>`
+      - :func:`pywikibot.error()<pywikibot.logging.error>`
+      - :func:`pywikibot.exception()<pywikibot.logging.exception>`
+      - :func:`pywikibot.info()<pywikibot.logging.info>`
+      - :func:`pywikibot.log()<pywikibot.logging.log>`
+      - :func:`pywikibot.output()<pywikibot.logging.output>`
+      - :func:`pywikibot.stdout()<pywikibot.logging.stdout>`
+      - :func:`pywikibot.warning()<pywikibot.logging.warning>`
diff --git a/docs/api_ref/pywikibot.page.rst b/docs/api_ref/pywikibot.page.rst
index f3712ad..7d38815 100644
--- a/docs/api_ref/pywikibot.page.rst
+++ b/docs/api_ref/pywikibot.page.rst
@@ -5,6 +5,27 @@
 .. automodule:: page
    :synopsis: Interface of various types of MediaWiki pages

+   .. admonition:: Imports in :mod:`pywikibot` module
+      :class: note
+
+      The following classes and function are inported in :mod:`pywikibot` 
module
+      and can also be used as :mod:`pywikibot` members:
+
+      - :class:`pywikibot.Category<page.Category>`
+      - :class:`pywikibot.Claim<page.Claim>`
+      - :class:`pywikibot.FilePage<page.FilePage>`
+      - :class:`pywikibot.ItemPage<page.ItemPage>`
+      - :class:`pywikibot.LexemeForm<page.LexemeForm>`
+      - :class:`pywikibot.LexemePage<page.LexemePage>`
+      - :class:`pywikibot.LexemeSense<page.LexemeSense>`
+      - :class:`pywikibot.Link<page.Link>`
+      - :class:`pywikibot.Page<page.Page>`
+      - :class:`pywikibot.PropertyPage<page.PropertyPage>`
+      - :class:`pywikibot.SiteLink<page.SiteLink>`
+      - :class:`pywikibot.User<page.User>`
+      - :func:`pywikibot.html2unicode()<page.html2unicode>`
+
+
 :mod:`page.\_collections` Wikibase Entity Structures
 ====================================================

diff --git a/docs/api_ref/pywikibot.rst b/docs/api_ref/pywikibot.rst
index b3e6b92..804cd7e 100644
--- a/docs/api_ref/pywikibot.rst
+++ b/docs/api_ref/pywikibot.rst
@@ -3,10 +3,17 @@
 ***********************************************

 .. automodule:: pywikibot
-   :exclude-members: Bot, CurrentPageBot, WikidataBot, calledModuleName,
-       handle_args, input, input_choice, input_yn, show_help
+   :exclude-members:
+       Bot, CurrentPageBot, WikidataBot, calledModuleName, handle_args, input,
+       input_choice, input_yn, show_help,
+       translate,
+       critical, debug, error, exception, info, log, output, stdout, warning,
+       Category, Claim, FilePage, ItemPage, LexemeForm, LexemePage, 
LexemeSense,
+       Link, MediaInfo, Page, PropertyPage, SiteLink, User, html2unicode,
+       Timestamp

    .. admonition:: Imports from :mod:`bot` module
+      :class: tip

       The following classes and functions are inported from :mod:`bot` module
       but can also be used as :mod:`pywikibot` members:
@@ -14,9 +21,61 @@
       - :class:`pywikibot.Bot<bot.Bot>`
       - :class:`pywikibot.CurrentPageBot<bot.CurrentPageBot>`
       - :class:`pywikibot.WikidataBot<bot.WikidataBot>`
-      - :func:`pywikibot.calledModuleName<bot.calledModuleName>`
-      - :func:`pywikibot.handle_args<bot.handle_args>`
-      - :func:`pywikibot.input<bot.input>`
-      - :func:`pywikibot.input_choice<bot.input_choice>`
-      - :func:`pywikibot.input_yn<bot.input_yn>`
-      - :func:`pywikibot.show_help<bot.show_help>`
+      - :func:`pywikibot.calledModuleName()<bot.calledModuleName>`
+      - :func:`pywikibot.handle_args()<bot.handle_args>`
+      - :func:`pywikibot.input()<bot.input>`
+      - :func:`pywikibot.input_choice()<bot.input_choice>`
+      - :func:`pywikibot.input_yn()<bot.input_yn>`
+      - :func:`pywikibot.show_help()<bot.show_help>`
+
+   .. admonition:: Imports from :mod:`i18n` module
+      :class: tip
+
+      The following function is inported from :mod:`i18n` module but can also 
be
+      used as :mod:`pywikibot` members:
+
+      - :class:`pywikibot.translate()<i18n.translate>`
+
+   .. admonition:: Imports from :mod:`logging` module
+      :class: tip
+
+      The following functions are inported from :mod:`logging` module but can
+      also be used as :mod:`pywikibot` members:
+
+      - :func:`pywikibot.critical()<logging.critical>`
+      - :func:`pywikibot.debug()<logging.debug>`
+      - :func:`pywikibot.error()<logging.error>`
+      - :func:`pywikibot.exception()<logging.exception>`
+      - :func:`pywikibot.info()<logging.info>`
+      - :func:`pywikibot.log()<logging.log>`
+      - :func:`pywikibot.output()<logging.output>`
+      - :func:`pywikibot.stdout()<logging.stdout>`
+      - :func:`pywikibot.warning()<logging.warning>`
+
+   .. admonition:: Imports from :mod:`page` module
+      :class: tip
+
+      The following classes and function are inported from :mod:`page` module
+      but can also be used as :mod:`pywikibot` members:
+
+      - :class:`pywikibot.Category<page.Category>`
+      - :class:`pywikibot.Claim<page.Claim>`
+      - :class:`pywikibot.FilePage<page.FilePage>`
+      - :class:`pywikibot.ItemPage<page.ItemPage>`
+      - :class:`pywikibot.LexemeForm<page.LexemeForm>`
+      - :class:`pywikibot.LexemePage<page.LexemePage>`
+      - :class:`pywikibot.LexemeSense<page.LexemeSense>`
+      - :class:`pywikibot.Link<page.Link>`
+      - :class:`pywikibot.Page<page.Page>`
+      - :class:`pywikibot.PropertyPage<page.PropertyPage>`
+      - :class:`pywikibot.SiteLink<page.SiteLink>`
+      - :class:`pywikibot.User<page.User>`
+      - :func:`pywikibot.html2unicode()<page.html2unicode>`
+
+   .. admonition:: Imports from :mod:`time<pywikibot.time>` module
+      :class: tip
+
+      The following class is inported from :mod:`time<pywikibot.time>` module
+      but can also be used as :mod:`pywikibot` members:
+
+      - :class:`pywikibot.Timestamp<time.Timestamp>`

--
To view, visit 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1043068?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.wikimedia.org/r/settings?usp=email

Gerrit-MessageType: merged
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I391e057eaf368b3a01e6c7df96f2ae3dd95e4e49
Gerrit-Change-Number: 1043068
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to