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

Method visit_class_def

mypy/stats.py:183–191  ·  view source on GitHub ↗
(self, o: ClassDef)

Source from the content-addressed store, hash-verified

181 return self.checked_scopes[-1]
182
183 def visit_class_def(self, o: ClassDef) -> None:
184 self.record_line(o.line, TYPE_PRECISE) # TODO: Look at base classes
185 # Override this method because we don't want to analyze base_type_exprs (base_type_exprs
186 # are base classes in a class declaration).
187 # While base_type_exprs are technically expressions, type analyzer does not visit them and
188 # they are not in the typemap.
189 for d in o.decorators:
190 d.accept(self)
191 o.defs.accept(self)
192
193 def visit_type_application(self, o: TypeApplication) -> None:
194 self.line = o.line

Callers

nothing calls this directly

Calls 2

record_lineMethod · 0.95
acceptMethod · 0.45

Tested by

no test coverage detected