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

Function apply_class_attr_hook

mypy/checkmember.py:1340–1349  ·  view source on GitHub ↗
(
    mx: MemberContext, hook: Callable[[AttributeContext], Type] | None, result: Type
)

Source from the content-addressed store, hash-verified

1338
1339
1340def apply_class_attr_hook(
1341 mx: MemberContext, hook: Callable[[AttributeContext], Type] | None, result: Type
1342) -> Type | None:
1343 if hook:
1344 result = hook(
1345 AttributeContext(
1346 get_proper_type(mx.original_type), result, mx.is_lvalue, mx.context, mx.chk
1347 )
1348 )
1349 return result
1350
1351
1352def analyze_enum_class_attribute_access(

Callers 1

Calls 2

AttributeContextClass · 0.90
get_proper_typeFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…