Path 1: 3 calls (0.75)

FunctionDef (3)

FunctionDef (3)

1def get_setters_property(node: nodes.FunctionDef) -> nodes.FunctionDef | None:
2    """Get the property node for the given setter node.
3
4    :param node: The node to get the property for.
5    :type node: nodes.FunctionDef
6
7    :rtype: nodes.FunctionDef or None
8    :returns: The node relating to the property of the given setter node,
9        or None if one could not be found.
10    """
11    property_ = None
12
13    property_name = get_setters_property_name(node)
14    class_node = utils.node_frame_class(node)
15    if property_name and class_node:
16        class_attrs: list[nodes.FunctionDef] = class_node.getattr(node.name)
17        for attr in class_attrs:
18            if utils.decorated_with_property(attr):
19                property_ = attr
20                break
21
22    return property_
            

Path 2: 1 calls (0.25)

FunctionDef (1)

None (1)

1def get_setters_property(node: nodes.FunctionDef) -> nodes.FunctionDef | None:
2    """Get the property node for the given setter node.
3
4    :param node: The node to get the property for.
5    :type node: nodes.FunctionDef
6
7    :rtype: nodes.FunctionDef or None
8    :returns: The node relating to the property of the given setter node,
9        or None if one could not be found.
10    """
11    property_ = None
12
13    property_name = get_setters_property_name(node)
14    class_node = utils.node_frame_class(node)
15    if property_name and class_node:
16        class_attrs: list[nodes.FunctionDef] = class_node.getattr(node.name)
17        for attr in class_attrs:
18            if utils.decorated_with_property(attr):
19                property_ = attr
20                break
21
22    return property_