MCPcopy Index your code
hub / github.com/python/mypy / cleanse

Method cleanse

mypy/binder.py:289–293  ·  view source on GitHub ↗

Remove all references to a Node from the binder.

(self, expr: Expression)

Source from the content-addressed store, hash-verified

287 return any(f.suppress_unreachable_warnings for f in self.frames)
288
289 def cleanse(self, expr: Expression) -> None:
290 """Remove all references to a Node from the binder."""
291 key = literal_hash(expr)
292 assert key is not None, "Internal error: binder tried cleanse non-literal"
293 self._cleanse_key(key)
294
295 def _cleanse_key(self, key: Key) -> None:
296 """Remove all references to a key from the binder."""

Callers 1

Calls 2

_cleanse_keyMethod · 0.95
literal_hashFunction · 0.90

Tested by

no test coverage detected