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

Method leave_class

mypy/scope.py:95–103  ·  view source on GitHub ↗

Leave a class target scope.

(self)

Source from the content-addressed store, hash-verified

93 self.ignored += 1
94
95 def leave_class(self) -> None:
96 """Leave a class target scope."""
97 if self.ignored:
98 # Leave a scope that's included in the enclosing target.
99 self.ignored -= 1
100 else:
101 assert self.classes
102 # Leave the innermost class.
103 self.classes.pop()
104
105 @contextmanager
106 def class_scope(self, info: TypeInfo) -> Iterator[None]:

Callers 1

class_scopeMethod · 0.95

Calls 1

popMethod · 0.45

Tested by

no test coverage detected