mirror of
https://github.com/github/codeql.git
synced 2025-12-18 09:43:15 +01:00
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.
6 lines
474 B
Plaintext
6 lines
474 B
Plaintext
| variables_test.py:29:5:29:5 | x | The value assigned to local variable 'x' is never used. |
|
|
| variables_test.py:89:5:89:5 | a | The value assigned to local variable 'a' is never used. |
|
|
| variables_test.py:89:7:89:7 | b | The value assigned to local variable 'b' is never used. |
|
|
| variables_test.py:89:9:89:9 | c | The value assigned to local variable 'c' is never used. |
|
|
| variables_test.py:95:5:95:7 | var | The value assigned to local variable 'var' is never used. |
|