Skip to content

Commit a5df681

Browse files
committed
Fix __contains__ signature according to pyright
1 parent f704b0e commit a5df681

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

plugin/core/collections.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,9 @@ def __bool__(self) -> bool:
113113
"""
114114
return bool(self._d)
115115

116-
def __contains__(self, path: str) -> bool:
116+
def __contains__(self, path: object) -> bool:
117+
if not isinstance(path, str):
118+
return False
117119
value = self.get(path)
118120
return value is not None and value is not False
119121

0 commit comments

Comments
 (0)