Skip to content

Commit c2443f2

Browse files
committed
Python: ObjectAPI to ValueAPI: OverlyComplexDelMethod: Adds preliminary modernization
1 parent a0992aa commit c2443f2

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

python/ql/src/Functions/OverlyComplexDelMethod.ql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515

1616
import python
1717

18-
from FunctionObject method
18+
from FunctionValue method
1919
where
20-
exists(ClassObject c |
20+
exists(ClassValue c |
2121
c.declaredAttribute("__del__") = method and
22-
method.getFunction().getMetrics().getCyclomaticComplexity() > 3
22+
method.getScope().getMetrics().getCyclomaticComplexity() > 3
2323
)
2424
select method, "Overly complex '__del__' method."
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
| protocols.py:74:5:74:22 | Function __del__ | Overly complex '__del__' method. |
1+
| protocols.py:74:5:74:22 | Function MegaDel.__del__ | Overly complex '__del__' method. |

0 commit comments

Comments
 (0)