Skip to content

Commit bd41bb5

Browse files
authored
Merge pull request github#3032 from BekaValentine/python-objectapi-to-valueapi-signatureoverriddenmethod
Python: ObjectAPI to ValueAPI: SignatureOverriddenMethod
2 parents 0b09bfe + 28319ee commit bd41bb5

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

python/ql/src/Functions/SignatureOverriddenMethod.ql

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,17 @@
1414
import python
1515
import Expressions.CallArgs
1616

17-
from FunctionObject base, PyFunctionObject derived
17+
from FunctionValue base, PythonFunctionValue derived
1818
where
1919
not exists(base.getACall()) and
20-
not exists(FunctionObject a_derived |
20+
not exists(FunctionValue a_derived |
2121
a_derived.overrides(base) and
2222
exists(a_derived.getACall())
2323
) and
24-
not derived.getFunction().isSpecialMethod() and
24+
not derived.getScope().isSpecialMethod() and
2525
derived.getName() != "__init__" and
2626
derived.isNormalMethod() and
27-
not derived.getFunction().isSpecialMethod() and
27+
not derived.getScope().isSpecialMethod() and
2828
// call to overrides distributed for efficiency
2929
(
3030
derived.overrides(base) and derived.minParameters() > base.maxParameters()
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
| om_test.py:32:5:32:35 | Function grossly_wrong1 | Overriding method 'grossly_wrong1' has signature mismatch with $@. | om_test.py:12:5:12:41 | Function grossly_wrong1 | overridden method |
2-
| om_test.py:35:5:35:47 | Function grossly_wrong2 | Overriding method 'grossly_wrong2' has signature mismatch with $@. | om_test.py:15:5:15:41 | Function grossly_wrong2 | overridden method |
1+
| om_test.py:32:5:32:35 | Function Derived.grossly_wrong1 | Overriding method 'grossly_wrong1' has signature mismatch with $@. | om_test.py:12:5:12:41 | Function Base.grossly_wrong1 | overridden method |
2+
| om_test.py:35:5:35:47 | Function Derived.grossly_wrong2 | Overriding method 'grossly_wrong2' has signature mismatch with $@. | om_test.py:15:5:15:41 | Function Base.grossly_wrong2 | overridden method |
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
| test.py:30:5:30:26 | Function meth3 | Overriding method 'meth3' has signature mismatch with $@. | test.py:11:5:11:20 | Function meth3 | overridden method |
1+
| test.py:30:5:30:26 | Function Derived.meth3 | Overriding method 'meth3' has signature mismatch with $@. | test.py:11:5:11:20 | Function Base.meth3 | overridden method |

0 commit comments

Comments
 (0)