-
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-2323 Add unit test case on S5655 when called function is impo…
…rted (#2149)
- Loading branch information
1 parent
bf4e354
commit 4da8b75
Showing
3 changed files
with
20 additions
and
0 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
1 change: 1 addition & 0 deletions
1
python-checks/src/test/resources/checks/argumentTypeImported.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 @@ | ||
def imported_function(params: list[str]): ... |
7 changes: 7 additions & 0 deletions
7
python-checks/src/test/resources/checks/argumentTypeImporting.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,7 @@ | ||
from argumentTypeImported import imported_function | ||
|
||
def local_function(params: list[str]): ... | ||
|
||
def imported_fn(): | ||
imported_function(("Name", "Tags")) # FN SONARPY-2325 | ||
local_function(("Name", "Tags")) # Noncompliant |