jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/375621 )
Change subject: page.py: Add __repr__ method for Claim objects ......................................................................
page.py: Add __repr__ method for Claim objects
Change-Id: I3e95131bc84d8620feee30d48e2907d56db9b22a --- M pywikibot/page.py 1 file changed, 5 insertions(+), 0 deletions(-)
Approvals: jenkins-bot: Verified Xqt: Looks good to me, approved
diff --git a/pywikibot/page.py b/pywikibot/page.py index c03c878..66e0c5a 100644 --- a/pywikibot/page.py +++ b/pywikibot/page.py @@ -4680,6 +4680,11 @@ self.rank = 'normal' self.on_item = None # The item it's on
+ def __repr__(self): + """Return the representation string.""" + return '{cls_name}.fromJSON({0}, {1})'.format( + repr(self.repo), self.toJSON(), cls_name=type(self).__name__) + @classmethod def fromJSON(cls, site, data): """
pywikibot-commits@lists.wikimedia.org