]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
conform to abstract set class type for __contains__
authorBob Halley <halley@dnspython.org>
Fri, 5 Dec 2025 23:57:20 +0000 (15:57 -0800)
committerBob Halley <halley@dnspython.org>
Fri, 5 Dec 2025 23:57:20 +0000 (15:57 -0800)
dns/btree.py

index 12da9f56e9a5130f5030e8a54464a3fc7f9f904b..eac8055078bd7bd0a95d4748dd6ab152c8cf9cf3 100644 (file)
@@ -839,8 +839,8 @@ class BTreeSet(BTree, Generic[KT], MutableSet[KT]):
         super().__init__(t=t, original=original)
         self.in_order = in_order
 
-    def __contains__(self, key: Any) -> bool:
-        return self.get_element(key) is not None
+    def __contains__(self, x: object) -> bool:
+        return self.get_element(x) is not None
 
     def add(self, value: KT) -> None:
         elt = Member(value)