jenkins-bot has submitted this change. ( 
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/642905 )

Change subject: [IMPR] Add repr() method to BaseDataDict and ClaimCollection
......................................................................

[IMPR] Add repr() method to BaseDataDict and ClaimCollection

Change-Id: I26a3048a0fa4696a435fe597dc075c8d56962d4b
---
M pywikibot/page/__init__.py
1 file changed, 6 insertions(+), 0 deletions(-)

Approvals:
  Xqt: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/pywikibot/page/__init__.py b/pywikibot/page/__init__.py
index 46ecef9..94e9c55 100644
--- a/pywikibot/page/__init__.py
+++ b/pywikibot/page/__init__.py
@@ -3397,6 +3397,9 @@
         key = self.normalizeKey(key)
         return key in self._data

+    def __repr__(self):
+        return '{}({})'.format(type(self), self._data)
+
     @staticmethod
     def normalizeKey(key) -> str:
         """Helper function to return language codes of a site object."""
@@ -3531,6 +3534,9 @@
     def __contains__(self, key):
         return key in self._data

+    def __repr__(self):
+        return '{}({})'.format(type(self), self._data)
+
     @classmethod
     def normalizeData(cls, data):
         # no normalization here, should there be?

--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/642905
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.wikimedia.org/r/settings

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I26a3048a0fa4696a435fe597dc075c8d56962d4b
Gerrit-Change-Number: 642905
Gerrit-PatchSet: 3
Gerrit-Owner: Mpaa <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged
_______________________________________________
Pywikibot-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits

Reply via email to