| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -10,16 +10,17 @@ | |||
| 10 | 10 | */ | |
| 11 | 11 | ||
| 12 | 12 | import python | |
| 13 | - private import LegacyPointsTo | ||
| 13 | + private import semmle.python.dataflow.new.internal.DataFlowDispatch | ||
| 14 | 14 | ||
| 15 | 15 | predicate slice_method_name(string name) { | |
| 16 | 16 | name = "__getslice__" or name = "__setslice__" or name = "__delslice__" | |
| 17 | 17 | } | |
| 18 | 18 | ||
| 19 | - from PythonFunctionValue f, string meth | ||
| 19 | + from Function f, string meth | ||
| 20 | 20 | where | |
| 21 | - f.getScope().isMethod() and | ||
| 22 | - not f.isOverridingMethod() and | ||
| 21 | + f.isMethod() and | ||
| 23 | 22 | slice_method_name(meth) and | |
| 24 | - f.getName() = meth | ||
| 23 | + f.getName() = meth and | ||
| 24 | + not DuckTyping::overridesMethod(f) and | ||
| 25 | + not DuckTyping::hasUnresolvedBase(getADirectSuperclass*(f.getScope())) | ||
| 25 | 26 | select f, meth + " method has been deprecated since Python 2.0." | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,3 +1,3 @@ | |||
| 1 | - | functions_test.py:95:5:95:40 | Function DeprecatedSliceMethods.__getslice__ | __getslice__ method has been deprecated since Python 2.0. | | ||
| 2 | - | functions_test.py:98:5:98:47 | Function DeprecatedSliceMethods.__setslice__ | __setslice__ method has been deprecated since Python 2.0. | | ||
| 3 | - | functions_test.py:101:5:101:40 | Function DeprecatedSliceMethods.__delslice__ | __delslice__ method has been deprecated since Python 2.0. | | ||
| 1 | + | functions_test.py:95:5:95:40 | Function __getslice__ | __getslice__ method has been deprecated since Python 2.0. | | ||
| 2 | + | functions_test.py:98:5:98:47 | Function __setslice__ | __setslice__ method has been deprecated since Python 2.0. | | ||
| 3 | + | functions_test.py:101:5:101:40 | Function __delslice__ | __delslice__ method has been deprecated since Python 2.0. | | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments