jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/355908 )
Change subject: Clean up issue with _WbDataPage
......................................................................
Clean up issue with _WbDataPage
The first merged patch (
https://gerrit.wikimedia.org/r/351714)
was broken and a quick fix (
https://gerrit.wikimedia.org/r/355812)
was introduced to stop the tests from crashing.
This patch cleans up the issue in the original patch.
I removed the None default for site since the site value should
always be passed to this function and since the function has not
been in production long enough to warrent allowing it to not have
the site passed simply for backwards compatibility.
Bug: T166362
Change-Id: If2790daeb2c11ff8622f95a8c4cec3a9700d667c
---
M pywikibot/__init__.py
1 file changed, 2 insertions(+), 3 deletions(-)
Approvals:
Merlijn van Deen: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/__init__.py b/pywikibot/__init__.py
index 42ac0dd..4856a66 100644
--- a/pywikibot/__init__.py
+++ b/pywikibot/__init__.py
@@ -994,7 +994,7 @@
return self.page.title()
@classmethod
- def fromWikibase(cls, page_name, site=None, data_site=None):
+ def fromWikibase(cls, page_name, site):
"""
Create a _WbDataPage from the JSON data given by the Wikibase API.
@@ -1004,8 +1004,7 @@
@type site: pywikibot.site.DataSite
@rtype: pywikibot._WbDataPage
"""
- site = site or Site().data_repository()
- data_site = data_site or cls._get_data_site(site)
+ data_site = cls._get_data_site(site)
page = Page(data_site, page_name)
return cls(page, site)
--
To view, visit
https://gerrit.wikimedia.org/r/355908
To unsubscribe, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If2790daeb2c11ff8622f95a8c4cec3a9700d667c
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Lokal Profil <lokal.profil(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: jenkins-bot <>