jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/329058 )
Change subject: Check for common class when comparing with string
......................................................................
Check for common class when comparing with string
Change-Id: I65ff47ae4f20e14b19499d50295054e46264185e
---
M pywikibot/page.py
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
jenkins-bot: Verified
Xqt: Looks good to me, approved
diff --git a/pywikibot/page.py b/pywikibot/page.py
index 586e907..e7aa8e3 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -4726,7 +4726,7 @@
The function checks for:
- - ItemPage ID equality
+ - WikibasePage ID equality
- WbTime year equality
- Coordinate equality, regarding precision
- WbMonolingualText text equality
@@ -4737,7 +4737,7 @@
false otherwise
@rtype: bool
"""
- if (isinstance(self.target, pywikibot.ItemPage) and
+ if (isinstance(self.target, WikibasePage) and
isinstance(value, basestring)):
return self.target.id == value
--
To view, visit
https://gerrit.wikimedia.org/r/329058
To unsubscribe, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I65ff47ae4f20e14b19499d50295054e46264185e
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Matěj Suchánek <matejsuchanek97(a)gmail.com>
Gerrit-Reviewer: Dalba <dalba.wiki(a)gmail.com>
Gerrit-Reviewer: Magul <tomasz.magulski(a)gmail.com>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot <>