Skip to content

Commit e4d132b

Browse files
SONARPY-2638 Fix new FNs on S2638 coming from a wrongly resolved class hierarchy with generic classes
1 parent 5324748 commit e4d132b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

python-checks/src/test/resources/checks/changeMethodContract/changeMethodContract.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ def using_tuple(self, (a, b, c)): ... # FN
4343
class ChildFromIntermediateWithGenericParentClass(IntermediateWithGenericParentClass):
4444
def __init__(p1, p2, p3): ... # OK
4545
def compliant(self, param1): ...
46-
def with_keyword_only(self, param1, param2, param3): ... # FN SONARPY-2344
46+
def with_keyword_only(self, param1, param2, param3): ... # Noncompliant
4747
def with_decorator(self): ... # OK
4848
def with_default(self, param1=1): ... # OK
49-
def my_method(self, param1, param2): ... # FN SONARPY-2344
49+
def my_method(self, param1, param2): ... # Noncompliant
5050
def with_kwargs(self, param1): ... # OK
51-
def __private_method(self, param1): ... # FN SONARPY-2344
51+
def __private_method(self, param1): ... # Noncompliant
5252
def attr(self): ...
5353
def using_tuple(self, (a, b, c)): ... # FN
5454

python-checks/src/test/resources/checks/changeMethodContract/changeMethodContractParent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from typing import Any
22

3-
class ParentClass(object):
3+
class ParentClass[T](object):
44
def __init__(p1, p2): ...
55
def compliant(self, param1): ...
66
def my_method(self, param1): ...

0 commit comments

Comments
 (0)