Method: pylint.checkers.utils.decorated_with_property
Calls: 2420, Exceptions: 6, Paths: 4Back
Path 1: 2063 calls (0.85)
FunctionDef (2015) Property (36) AsyncFunctionDef (12)
False (2063)
1def decorated_with_property(node: nodes.FunctionDef) -> bool:
2 """Detect if the given function node is decorated with a property."""
3 if not node.decorators:
4 return False
5 for decorator in node.decorators.nodes:
6 try:
7 if _is_property_decorator(decorator):
8 return True
9 except astroid.InferenceError:
10 pass
11 return False
Path 2: 272 calls (0.11)
FunctionDef (269) AsyncFunctionDef (3)
False (272)
1def decorated_with_property(node: nodes.FunctionDef) -> bool:
2 """Detect if the given function node is decorated with a property."""
3 if not node.decorators:
4 return False
5 for decorator in node.decorators.nodes:
6 try:
7 if _is_property_decorator(decorator):
8 return True
9 except astroid.InferenceError:
10 pass
11 return False
Path 3: 79 calls (0.03)
FunctionDef (79)
True (79)
1def decorated_with_property(node: nodes.FunctionDef) -> bool:
2 """Detect if the given function node is decorated with a property."""
3 if not node.decorators:
4 return False
5 for decorator in node.decorators.nodes:
6 try:
7 if _is_property_decorator(decorator):
8 return True
9 except astroid.InferenceError:
10 pass
11 return False
Path 4: 6 calls (0.0)
FunctionDef (6)
False (6)
InferenceError (6)
1def decorated_with_property(node: nodes.FunctionDef) -> bool:
2 """Detect if the given function node is decorated with a property."""
3 if not node.decorators:
4 return False
5 for decorator in node.decorators.nodes:
6 try:
7 if _is_property_decorator(decorator):
8 return True
9 except astroid.InferenceError:
10 pass
11 return False