Rasmus Lerchedahl Petersen
b042c60ca3
python: remove outdated comment
2023-03-20 14:13:48 +01:00
Rasmus Lerchedahl Petersen
5f438e433d
python: exclude nonlocals from query
2023-03-20 13:34:39 +01:00
Rasmus Lerchedahl Petersen
9b7a20f4ad
python: add example showing FP
2023-03-20 13:03:26 +01:00
Calum Grant
a1d229e445
Python: Remove references to LGTM
2022-12-19 15:15:32 +00:00
erik-krogh
6fdfd40880
changes to address reviews
2022-10-07 22:31:00 +02:00
erik-krogh
944ca4a0da
fix some more style-guide violations in the alert-messages
2022-10-07 11:23:34 +02:00
erik-krogh
014dcd1454
fixup a Python query, it didn't select something with a location
2022-08-24 16:23:20 +02:00
erik-krogh
1a7d3ee831
update expected output after changing queries
2022-08-23 12:35:32 +02:00
Taus
bbcbcefedc
Python: Add false negative test case.
2021-07-20 12:54:06 +00:00
Taus
233ae5a54b
Python: Fix FP in py/unused-local-variable
...
This is only a temporary fix, as indicated by the TODO comment.
The real underlying issue is the fact that `isUnused` is defined in
terms of the underlying SSA variables (as these are only created
for variables that are actually used), and the fact that annotated
assignments are always considered to redefine their targets, which may
not actually be the case.
Thus, the correct fix would be to change the extractor to _disregard_
mere type annotations for the purposes of figuring out whether an
SSA variable should be created or not.
However, in the short term the present fix is likely sufficient.
2021-07-20 12:13:44 +00:00
Taus
8b3fa789da
Python: Add AnnAssign DefinitionNode
...
This was a source of false positives for the
`py/uninitialized-local-variable` query, as exemplified by the test
case.
2021-07-20 11:57:26 +00:00
Taus
f91e826781
Python: Add test case
2021-07-20 11:57:12 +00:00
Taus
36be72972d
Merge pull request #2663 from tausbn/python-type-annotation-reuse-fp
...
Python: Add false positive test example for issue #2652 .
2021-02-16 18:46:15 +01:00
Taus Brock-Nannestad
ead687da06
Python: Add false positive test example for issue #2652 .
2020-01-21 15:28:01 +01:00
Rasmus Wriedt Larsen
81e27aab8d
Python: Modernise py/unused-loop-variable
2019-12-20 15:05:49 +01:00
Taus Brock-Nannestad
5946a4a066
Python: Teach py/unused-local-variable about nonlocal.
2019-10-03 17:56:29 +02:00
Taus Brock-Nannestad
92f48191c2
Update test results for UndefinedGlobal.ql.
2019-08-22 17:53:36 +02:00
Taus Brock-Nannestad
b82ebf2a37
Add tests.
2019-08-22 16:30:14 +02:00
Mark Shannon
05b69a1c0f
QL tests for Python queries and libraries.
2018-11-19 15:15:54 +00:00