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

Method visit_class_def

mypy/semanal.py:1831–1842  ·  view source on GitHub ↗
(self, defn: ClassDef)

Source from the content-addressed store, hash-verified

1829 #
1830
1831 def visit_class_def(self, defn: ClassDef) -> None:
1832 self.statement = defn
1833 self.incomplete_type_stack.append(not defn.info)
1834 namespace = self.qualified_name(defn.name)
1835 with self.tvar_scope_frame(self.tvar_scope.class_frame(namespace)):
1836 if self.push_type_args(defn.type_args, defn) is None:
1837 self.mark_incomplete(defn.name, defn)
1838 return
1839
1840 self.analyze_class(defn)
1841 self.pop_type_args(defn.type_args)
1842 self.incomplete_type_stack.pop()
1843
1844 def push_type_args(
1845 self, type_args: list[TypeParam] | None, context: Context

Callers

nothing calls this directly

Calls 9

qualified_nameMethod · 0.95
tvar_scope_frameMethod · 0.95
push_type_argsMethod · 0.95
mark_incompleteMethod · 0.95
analyze_classMethod · 0.95
pop_type_argsMethod · 0.95
appendMethod · 0.80
class_frameMethod · 0.80
popMethod · 0.45

Tested by

no test coverage detected