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

Change subject: [IMPR] Remove methods already derived from mixins
......................................................................

[IMPR] Remove methods already derived from mixins

__contains__() and clear() methods are derived from MutableMapping

Change-Id: I1200e9316e73b584eb1ef29e50ed5ec4afa1cc15
---
M pywikibot/data/api/_optionset.py
M pywikibot/data/api/_requests.py
2 files changed, 0 insertions(+), 13 deletions(-)

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



diff --git a/pywikibot/data/api/_optionset.py b/pywikibot/data/api/_optionset.py
index e6ce256..7663df2 100644
--- a/pywikibot/data/api/_optionset.py
+++ b/pywikibot/data/api/_optionset.py
@@ -124,11 +124,6 @@
         self._enabled = enabled | (self._enabled - disabled - removed)
         self._disabled = disabled | (self._disabled - enabled - removed)

-    def clear(self) -> None:
-        """Clear all enabled and disabled options."""
-        self._enabled.clear()
-        self._disabled.clear()
-
     def __setitem__(self, name, value):
         """Set option to enabled, disabled or neither."""
         if value is True:
@@ -172,10 +167,6 @@
         """Remove the item by setting it to None."""
         self[name] = None

-    def __contains__(self, name) -> bool:
-        """Return True if option has been set."""
-        return name in self._enabled or name in self._disabled
-
     def __iter__(self):
         """Iterate over each enabled and disabled option."""
         yield from self._enabled
diff --git a/pywikibot/data/api/_requests.py b/pywikibot/data/api/_requests.py
index 9f779ef..2f97e98 100644
--- a/pywikibot/data/api/_requests.py
+++ b/pywikibot/data/api/_requests.py
@@ -376,10 +376,6 @@
         """Implement dict interface."""
         return list(self._params.keys())

-    def __contains__(self, key) -> bool:
-        """Implement dict interface."""
-        return key in self._params
-
     def __iter__(self):
         """Implement dict interface."""
         return iter(self._params)

--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/806165
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: I1200e9316e73b584eb1ef29e50ed5ec4afa1cc15
Gerrit-Change-Number: 806165
Gerrit-PatchSet: 2
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
Gerrit-CC: Mpaa <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to