jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/489442 )
Change subject: [doc] Update doc strings ......................................................................
[doc] Update doc strings
Change detached from I6207b18b8225f7ddc1349dffe321d93a8bf25b00
Change-Id: Iaa24020ce4f6c2d888a01dba5204a1c6df6bf5a4 --- M pywikibot/family.py M pywikibot/site.py 2 files changed, 12 insertions(+), 4 deletions(-)
Approvals: Framawiki: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/family.py b/pywikibot/family.py index b3276ca..de741d4 100644 --- a/pywikibot/family.py +++ b/pywikibot/family.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- """Objects representing MediaWiki families.""" # -# (C) Pywikibot team, 2004-2018 +# (C) Pywikibot team, 2004-2019 # # Distributed under the terms of the MIT license. # @@ -1139,6 +1139,12 @@ The default value is the one used on Wikimedia Foundation wikis, but needs to be overridden in the family file for any wiki that uses a different value. + + @param code: Site code + @type code: str + @raises KeyError: code is not recognised + @return: URL path without ending '/' + @rtype str """ return '/w'
@@ -1162,10 +1168,12 @@ Prefix uri with port and hostname.
@param code: The site code + @type code: str @param uri: The absolute path after the hostname + @type uri: str @param protocol: The protocol which is used. If None it'll determine the protocol from the code. - @return: The full URL + @return: The full URL ending with uri @rtype: str """ protocol, host = self._hostname(code, protocol) diff --git a/pywikibot/site.py b/pywikibot/site.py index bf135f5..42c74fa 100644 --- a/pywikibot/site.py +++ b/pywikibot/site.py @@ -775,8 +775,8 @@ self.__code = self.__family.obsolete[self.__code] # Note the Site function in __init__ emits a UserWarning # for this condition, showing the callers file and line no. - pywikibot.log('Site %s instantiated using code %s' - % (self, code)) + pywikibot.log('Site {} instantiated using aliases code of {}' + .format(self, code)) else: # no such language anymore self.obsolete = True
pywikibot-commits@lists.wikimedia.org