From a1c4cdee1ea9ce434aa03f1d31317c0a85781d83 Mon Sep 17 00:00:00 2001 From: Jan Petykiewicz Date: Mon, 6 Feb 2023 18:58:53 -0800 Subject: [PATCH] fix type for __contains__ --- masque/library.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/masque/library.py b/masque/library.py index 25ee7c7..889d945 100644 --- a/masque/library.py +++ b/masque/library.py @@ -805,7 +805,7 @@ class WrapROLibrary(Library): def __len__(self) -> int: return len(self.mapping) - def __contains__(self, key: str) -> bool: + def __contains__(self, key: object) -> bool: return key in self.mapping def __repr__(self) -> str: @@ -833,7 +833,7 @@ class WrapLibrary(MutableLibrary): def __len__(self) -> int: return len(self.mapping) - def __contains__(self, key: str) -> bool: + def __contains__(self, key: object) -> bool: return key in self.mapping def __setitem__( @@ -932,7 +932,7 @@ class LazyLibrary(MutableLibrary): def __len__(self) -> int: return len(self.dict) - def __contains__(self, key: str) -> bool: + def __contains__(self, key: object) -> bool: return key in self.dict def _merge(self, key_self: str, other: Mapping[str, 'Pattern'], key_other: str) -> None: