Lokal Profil has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/346589 )
Change subject: Add _items for WbMonolingualText
......................................................................
Add _items for WbMonolingualText
This enables a __str__ and __repr__ for this class.
Also fixes whitespace issue (E305) at end of the class.
Change-Id: Ibba69fb19aaaf799f658323e0b3012cc1be121c2
---
M pywikibot/__init__.py
1 file changed, 3 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core
refs/changes/89/346589/1
diff --git a/pywikibot/__init__.py b/pywikibot/__init__.py
index 273e538..eff852a 100644
--- a/pywikibot/__init__.py
+++ b/pywikibot/__init__.py
@@ -772,6 +772,8 @@
class WbMonolingualText(_WbRepresentation):
"""A Wikibase monolingual text representation."""
+ _items = ('text', 'language')
+
def __init__(self, text, language):
"""
Create a new WbMonolingualText object.
@@ -809,6 +811,7 @@
"""
return cls(wb['text'], wb['language'])
+
_sites = {}
_url_cache = {} # The code/fam pair for each URL
--
To view, visit https://gerrit.wikimedia.org/r/346589
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibba69fb19aaaf799f658323e0b3012cc1be121c2
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Lokal Profil <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits