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

Method pop_undefined_ref

mypy/partially_defined.py:271–274  ·  view source on GitHub ↗

If name has previously been reported as undefined, the NameExpr that was called will be returned.

(self, name: str)

Source from the content-addressed store, hash-verified

269 self._scope().record_undefined_ref(o)
270
271 def pop_undefined_ref(self, name: str) -> set[NameExpr]:
272 """If name has previously been reported as undefined, the NameExpr that was called will be returned."""
273 assert len(self.scopes) > 0
274 return self._scope().pop_undefined_ref(name)
275
276 def is_possibly_undefined(self, name: str) -> bool:
277 assert len(self._scope().branch_stmts) > 0

Callers

nothing calls this directly

Calls 3

_scopeMethod · 0.95
lenFunction · 0.85
pop_undefined_refMethod · 0.45

Tested by

no test coverage detected