jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/481332 )

Change subject: Pywikibot: Add missing docsting params
......................................................................

Pywikibot: Add missing docsting params

Desciption for following params are added:
-In site.py param 'site' of init method of class InterwikiMap
-In site.py param 'prefix' of getitem method of class InterwikiMap
-In site.py param 'url' of get_by_url method of class InterwikiMap
-In bot_choice.py param 'options' of formatted method of class Option
-In bot_choice.py param 'shortcut' of init method of class StandardOption
-In bot_choice.py param 'text' of formatted method of class Option

Bug: T184115
Change-Id: I828025e5a2706950a1b5a3a6f0d795f0423ad499
---
M pywikibot/bot_choice.py
M pywikibot/site.py
2 files changed, 40 insertions(+), 5 deletions(-)

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



diff --git a/pywikibot/bot_choice.py b/pywikibot/bot_choice.py
index 8555e36..ac46c8b 100755
--- a/pywikibot/bot_choice.py
+++ b/pywikibot/bot_choice.py
@@ -38,7 +38,16 @@

     @staticmethod
     def formatted(text, options, default=None):
-        """Create a text with the options formatted into it."""
+        """
+        Create a text with the options formatted into it.
+
+        @param text: Text into which options are to be formatted
+        @type text: str
+        @param options: Option instances to be formatted
+        @type options: Iterable
+        @return: Text with the options formatted into it
+        @rtype: str
+        """
         formatted_options = []
         for option in options:
             formatted_options.append(option.format(default=default))
@@ -102,7 +111,14 @@
     """An option with a description and shortcut and returning the shortcut."""

     def __init__(self, option, shortcut, **kwargs):
-        """Initializer."""
+        """
+        Initializer.
+
+        @param option: option string
+        @type option: str
+        @param shortcut: Shortcut of the option
+        @type shortcut: str
+        """
         super(StandardOption, self).__init__(**kwargs)
         self.option = option
         self.shortcut = shortcut.lower()
diff --git a/pywikibot/site.py b/pywikibot/site.py
index ea0b4a3..4148f24 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -680,7 +680,12 @@
     """A representation of the interwiki map of a site."""

     def __init__(self, site):
-        """Create an empty uninitalized interwiki map for the given site."""
+        """
+        Create an empty uninitalized interwiki map for the given site.
+
+        @param site: Given site for which interwiki map is to be created
+        @type site: APISite
+        """
         super(_InterwikiMap, self).__init__()
         self._site = site
         self._map = None
@@ -700,7 +705,15 @@
         return self._map

     def __getitem__(self, prefix):
-        """Return the site, locality and url for the requested prefix."""
+        """
+        Return the site, locality and url for the requested prefix.
+
+        @param prefix: Interwiki prefix
+        @type prefix: Dictionary key
+        @rtype: _IWEntry
+        @raises KeyError: Prefix is not a key
+        @raises TypeError: Site for the prefix is of wrong type
+        """
         if prefix not in self._iw_sites:
             raise KeyError("'{0}' is not an interwiki prefix.".format(prefix))
         if isinstance(self._iw_sites[prefix].site, BaseSite):
@@ -712,7 +725,13 @@
                             % (prefix, type(self._iw_sites[prefix].site)))

     def get_by_url(self, url):
-        """Return a set of prefixes applying to the URL."""
+        """
+        Return a set of prefixes applying to the URL.
+
+        @param url: URL for the interwiki
+        @type url: str
+        @rtype: set
+        """
         return {prefix for prefix, iw_entry in self._iw_sites
                 if iw_entry.url == url}


--
To view, visit https://gerrit.wikimedia.org/r/481332
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.wikimedia.org/r/settings

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I828025e5a2706950a1b5a3a6f0d795f0423ad499
Gerrit-Change-Number: 481332
Gerrit-PatchSet: 10
Gerrit-Owner: AdityaJ <[email protected]>
Gerrit-Reviewer: AdityaJ <[email protected]>
Gerrit-Reviewer: John Vandenberg <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot (75)
Gerrit-CC: Rafidaslam <[email protected]>
_______________________________________________
Pywikibot-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits

Reply via email to