-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SONARPY-2284 Add tests for S2638 on imported class with decorator (#2130
- Loading branch information
1 parent
db907a1
commit ad5c9c9
Showing
3 changed files
with
21 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 1 addition & 15 deletions
16
python-checks/src/test/resources/checks/changeMethodContract.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
python-checks/src/test/resources/checks/changeMethodContractParent.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
class ParentClass(object): | ||
def __init__(p1, p2): ... | ||
def compliant(self, param1): ... | ||
def my_method(self, param1): ... | ||
def with_default(self, param1=42): ... | ||
def changed_param_order(self, param1, param2): ... | ||
def with_keyword_only(self, param1, *, param2): ... | ||
def with_kwargs(self, param1, **kwargs): ... | ||
@foo | ||
def with_decorator(self, param1): ... | ||
def __private_method(self): ... | ||
def using_tuple(self, (a, b)): ... | ||
def positional_only(self, param1, /, param2, *, param3): ... | ||
def with_two_keyword_only(self, *, param1, param2): ... | ||
attr = 42 |