mirror of
https://github.com/github/codeql.git
synced 2026-04-28 10:15:14 +02:00
Python: Handle @pytest.fixture decorations with arguments as well
Not the prettiest of solutions, but it seems to work well enough.
This commit is contained in:
@@ -6,5 +6,3 @@
|
||||
| imports_test.py:27:1:27:25 | Import | Import of 'func2' is not used. |
|
||||
| imports_test.py:34:1:34:14 | Import | Import of 'module2' is not used. |
|
||||
| imports_test.py:116:1:116:41 | Import | Import of 'not_a_fixture' is not used. |
|
||||
| imports_test.py:118:1:118:68 | Import | Import of 'session_fixture' is not used. |
|
||||
| imports_test.py:118:1:118:68 | Import | Import of 'wrapped_autouse_fixture' is not used. |
|
||||
|
||||
@@ -115,4 +115,4 @@ def baz() -> Optional['subexpression_return_type']:
|
||||
|
||||
from pytest_fixtures import not_a_fixture # BAD
|
||||
from pytest_fixtures import fixture, wrapped_fixture # GOOD (pytest fixtures are used implicitly by pytest)
|
||||
from pytest_fixtures import session_fixture, wrapped_autouse_fixture # GOOD [FALSE POSITIVE]
|
||||
from pytest_fixtures import session_fixture, wrapped_autouse_fixture # GOOD (pytest fixtures are used implicitly by pytest)
|
||||
|
||||
Reference in New Issue
Block a user