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

Function dataclass_type

mypyc/irbuild/util.py:97–102  ·  view source on GitHub ↗
(cdef: ClassDef)

Source from the content-addressed store, hash-verified

95# The string values returned by this function are inspected in
96# mypyc/lib-rt/misc_ops.c:CPyDataclass_SleightOfHand(...).
97def dataclass_type(cdef: ClassDef) -> str | None:
98 for d in cdef.decorators:
99 typ = dataclass_decorator_type(d)
100 if typ is not None:
101 return typ
102 return None
103
104
105def get_mypyc_attr_literal(e: Expression) -> Any:

Callers 2

transform_class_defFunction · 0.90
finalizeMethod · 0.90

Calls 1

dataclass_decorator_typeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…