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

Method is_func_scope

mypy/semanal.py:7434–7438  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

7432 self.missing_names.pop()
7433
7434 def is_func_scope(self) -> bool:
7435 scope_type = self.scope_stack[-1]
7436 if scope_type == SCOPE_ANNOTATION:
7437 scope_type = self.scope_stack[-2]
7438 return scope_type in (SCOPE_FUNC, SCOPE_COMPREHENSION)
7439
7440 def is_nested_within_func_scope(self) -> bool:
7441 """Are we underneath a function scope, even if we are in a nested class also?"""

Calls

no outgoing calls

Tested by

no test coverage detected