Skip to content

Commit 004523a

Browse files
authored
Merge pull request github#3222 from BekaValentine/python-objectapi-to-valueapi-overlycomplexdelmethod
Python: ObjectAPI to ValueAPI: OverlyComplexDelMethod
2 parents 42e9d14 + c2443f2 commit 004523a

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)