File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed
test/query-tests/Functions/general Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change 1212 */
1313
1414import python
15- private import LegacyPointsTo
15+ import semmle.python.Metrics
1616
17- from FunctionValue method
17+ from FunctionMetrics method
1818where
19- exists ( ClassValue c |
20- c .declaredAttribute ( "__del__" ) = method and
21- method .getScope ( ) .( FunctionMetricsWithPointsTo ) .getCyclomaticComplexity ( ) > 3
22- )
19+ method .getName ( ) = "__del__" and
20+ method .isMethod ( ) and
21+ method .getCyclomaticComplexity ( ) > 3
2322select method , "Overly complex '__del__' method."
Original file line number Diff line number Diff line change 1- | protocols.py:74:5:74:22 | Function MegaDel. __del__ | Overly complex '__del__' method. |
1+ | protocols.py:74:5:74:22 | Function __del__ | Overly complex '__del__' method. |
You can’t perform that action at this time.
0 commit comments