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

Change subject: [IMPR] derive abstract WbRepresentation from abstract base 
class abc.ABC
......................................................................

[IMPR] derive abstract WbRepresentation from abstract base class abc.ABC

Change-Id: I78144e78b4059fe4adc8d873bbf255d138f72a2b
---
M pywikibot/_wbtypes.py
1 file changed, 5 insertions(+), 1 deletion(-)

Approvals:
  D3r1ck01: Looks good to me, but someone else must approve
  Xqt: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/pywikibot/_wbtypes.py b/pywikibot/_wbtypes.py
index e074829..46d57a7 100644
--- a/pywikibot/_wbtypes.py
+++ b/pywikibot/_wbtypes.py
@@ -5,22 +5,26 @@
 #
 # Distributed under the terms of the MIT license.
 #
+import abc
 import json


-class WbRepresentation:
+class WbRepresentation(abc.ABC):

     """Abstract class for Wikibase representations."""

+    @abc.abstractmethod
     def __init__(self):
         """Constructor."""
         raise NotImplementedError

+    @abc.abstractmethod
     def toWikibase(self):
         """Convert representation to JSON for the Wikibase API."""
         raise NotImplementedError

     @classmethod
+    @abc.abstractmethod
     def fromWikibase(cls, json):
         """Create a representation object based on JSON from Wikibase API."""
         raise NotImplementedError

--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/616050
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: I78144e78b4059fe4adc8d873bbf255d138f72a2b
Gerrit-Change-Number: 616050
Gerrit-PatchSet: 2
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: D3r1ck01 <[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