jenkins-bot merged this change.

View Change

Approvals: Framawiki: Looks good to me, approved jenkins-bot: Verified
[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(-)

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

To view, visit change 489442. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Iaa24020ce4f6c2d888a01dba5204a1c6df6bf5a4
Gerrit-Change-Number: 489442
Gerrit-PatchSet: 2
Gerrit-Owner: Xqt <info@gno.de>
Gerrit-Reviewer: Framawiki <framawiki@tools.wmflabs.org>
Gerrit-Reviewer: John Vandenberg <jayvdb@gmail.com>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: jenkins-bot (75)
Gerrit-CC: Dalba <dalba.wiki@gmail.com>