jenkins-bot has submitted this change and it was merged.
Change subject: toJSON assert correct claim type
......................................................................
toJSON assert correct claim type
continues eb9d3a80
Bug: T113212
Change-Id: I0fc771ce8509cea3439f9d029ea8b108e1deb43d
---
M pywikibot/page.py
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
John Vandenberg: Looks good to me, approved
Lokal Profil: Looks good to me, but someone else must approve
jenkins-bot: Verified
diff --git a/pywikibot/page.py b/pywikibot/page.py
index ec7430a..22e6f33 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -4208,7 +4208,7 @@
data['qualifiers-order'] = list(self.qualifiers.keys())
for prop, qualifiers in self.qualifiers.items():
for qualifier in qualifiers:
- qualifier.isQualifier = True
+ assert qualifier.isQualifier is True
data['qualifiers'][prop] = [qualifier.toJSON() for qualifier
in qualifiers]
if len(self.sources) > 0:
data['references'] = []
@@ -4217,7 +4217,7 @@
for prop, val in collection.items():
reference['snaks'][prop] = []
for source in val:
- source.isReference = True
+ assert source.isReference is True
src_data = source.toJSON()
if 'hash' in src_data:
if 'hash' not in reference:
--
To view, visit
https://gerrit.wikimedia.org/r/244834
To unsubscribe, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I0fc771ce8509cea3439f9d029ea8b108e1deb43d
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Lokal Profil <lokal.profil(a)gmail.com>
Gerrit-Reviewer: Ricordisamoa <ricordisamoa(a)openmailbox.org>
Gerrit-Reviewer: Smalyshev <smalyshev(a)wikimedia.org>
Gerrit-Reviewer: Tobias47n9e <tobias47n9e(a)gmail.com>
Gerrit-Reviewer: XZise <CommodoreFabianus(a)gmx.de>
Gerrit-Reviewer: jenkins-bot <>