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

Method is_undefined

mypy/partially_defined.py:135–138  ·  view source on GitHub ↗
(self, name: str)

Source from the content-addressed store, hash-verified

133 return name in self.branches[-1].may_be_defined
134
135 def is_undefined(self, name: str) -> bool:
136 assert len(self.branches) > 0
137 branch = self.branches[-1]
138 return name not in branch.may_be_defined and name not in branch.must_be_defined
139
140 def is_defined_in_a_branch(self, name: str) -> bool:
141 assert len(self.branches) > 0

Callers 3

is_undefinedMethod · 0.45
visit_name_exprMethod · 0.45

Calls 1

lenFunction · 0.85

Tested by

no test coverage detected