MCPcopy Create free account
hub / github.com/python/mypy / analyze_class_body_common

Method analyze_class_body_common

mypy/semanal.py:2098–2105  ·  view source on GitHub ↗

Parts of class body analysis that are common to all kinds of class defs.

(self, defn: ClassDef)

Source from the content-addressed store, hash-verified

2096 return self.cur_mod_id == "builtins" and defn.name in CORE_BUILTIN_CLASSES
2097
2098 def analyze_class_body_common(self, defn: ClassDef) -> None:
2099 """Parts of class body analysis that are common to all kinds of class defs."""
2100 self.enter_class(defn.info)
2101 if any(b.self_type is not None for b in defn.info.mro):
2102 self.setup_self_type()
2103 defn.defs.accept(self)
2104 self.apply_class_plugin_hooks(defn)
2105 self.leave_class()
2106
2107 def analyze_typeddict_classdef(self, defn: ClassDef) -> bool:
2108 if (

Callers 2

analyze_classMethod · 0.95

Calls 6

enter_classMethod · 0.95
setup_self_typeMethod · 0.95
leave_classMethod · 0.95
anyFunction · 0.85
acceptMethod · 0.45

Tested by

no test coverage detected