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

Method enter_scope

mypy/stats.py:175–178  ·  view source on GitHub ↗
(self, o: FuncDef)

Source from the content-addressed store, hash-verified

173
174 @contextmanager
175 def enter_scope(self, o: FuncDef) -> Iterator[None]:
176 self.checked_scopes.append(o.type is not None and self.checked_scopes[-1])
177 yield None
178 self.checked_scopes.pop()
179
180 def is_checked_scope(self) -> bool:
181 return self.checked_scopes[-1]

Callers 1

visit_func_defMethod · 0.95

Calls 2

appendMethod · 0.80
popMethod · 0.45

Tested by

no test coverage detected