Path 1: 487 calls (0.5)

ClassDef (487)

Subscript (487)

True (487)

1def supports_getitem(value: nodes.NodeNG, node: nodes.NodeNG) -> bool:
2    if isinstance(value, nodes.ClassDef):
3        if _supports_protocol_method(value, CLASS_GETITEM_METHOD):
4            return True
5        if is_postponed_evaluation_enabled(node) and is_node_in_type_annotation_context(
6            node
7        ):
8            return True
9    return _supports_protocol(value, _supports_getitem_protocol)
            

Path 2: 460 calls (0.47)

Instance (240) Dict (98) List (87) Tuple (23) Const (11) Module (1)

Subscript (460)

True (448) False (12)

1def supports_getitem(value: nodes.NodeNG, node: nodes.NodeNG) -> bool:
2    if isinstance(value, nodes.ClassDef):
3        if _supports_protocol_method(value, CLASS_GETITEM_METHOD):
4            return True
5        if is_postponed_evaluation_enabled(node) and is_node_in_type_annotation_context(
6            node
7        ):
8            return True
9    return _supports_protocol(value, _supports_getitem_protocol)
            

Path 3: 22 calls (0.02)

ClassDef (22)

Subscript (22)

False (20) True (2)

1def supports_getitem(value: nodes.NodeNG, node: nodes.NodeNG) -> bool:
2    if isinstance(value, nodes.ClassDef):
3        if _supports_protocol_method(value, CLASS_GETITEM_METHOD):
4            return True
5        if is_postponed_evaluation_enabled(node) and is_node_in_type_annotation_context(
6            node
7        ):
8            return True
9    return _supports_protocol(value, _supports_getitem_protocol)