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

Method is_local_name

mypy/semanal.py:7631–7633  ·  view source on GitHub ↗

Does name look like reference to a definition in the current module?

(self, name: str)

Source from the content-addressed store, hash-verified

7629 self.already_defined(name, ctx, original_ctx, noun="Attribute")
7630
7631 def is_local_name(self, name: str) -> bool:
7632 """Does name look like reference to a definition in the current module?"""
7633 return self.is_defined_in_current_module(name) or "." not in name
7634
7635 def in_checked_function(self) -> bool:
7636 """Should we type-check the current function?

Callers 1

already_definedMethod · 0.95

Calls 1

Tested by

no test coverage detected