MCPcopy Create free account
hub / github.com/bpython/bpython / __contains__

Method __contains__

bpython/patch_linecache.py:44–51  ·  view source on GitHub ↗
(self, key: Any)

Source from the content-addressed store, hash-verified

42 return super().__getitem__(key)
43
44 def __contains__(self, key: Any) -> bool:
45 if self.is_bpython_filename(key):
46 try:
47 self.get_bpython_history(key)
48 return True
49 except KeyError:
50 return False
51 return super().__contains__(key)
52
53 def __delitem__(self, key: Any) -> None:
54 if not self.is_bpython_filename(key):

Callers

nothing calls this directly

Calls 2

is_bpython_filenameMethod · 0.95
get_bpython_historyMethod · 0.95

Tested by

no test coverage detected