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

Method is_classvar

mypy/semanal.py:5242–5248  ·  view source on GitHub ↗
(self, typ: Type)

Source from the content-addressed store, hash-verified

5240 s.type = None
5241
5242 def is_classvar(self, typ: Type) -> bool:
5243 if not isinstance(typ, UnboundType):
5244 return False
5245 sym = self.lookup_qualified(typ.name, typ)
5246 if not sym or not sym.node:
5247 return False
5248 return sym.node.fullname == "typing.ClassVar"
5249
5250 def is_final_type(self, typ: Type | None) -> bool:
5251 if not isinstance(typ, UnboundType):

Callers 5

unwrap_finalMethod · 0.95
check_classvarMethod · 0.95
visit_for_stmtMethod · 0.95
visit_with_stmtMethod · 0.95

Calls 2

lookup_qualifiedMethod · 0.95
isinstanceFunction · 0.85

Tested by

no test coverage detected