File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
python/ql/test/query-tests/Variables/unused Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change 1+ | type_annotation_fp.py:5:5:5:7 | foo | The value assigned to local variable 'foo' is never used. |
12| variables_test.py:29:5:29:5 | x | The value assigned to local variable 'x' is never used. |
23| variables_test.py:89:5:89:5 | a | The value assigned to local variable 'a' is never used. |
34| variables_test.py:89:7:89:7 | b | The value assigned to local variable 'b' is never used. |
Original file line number Diff line number Diff line change 1+ # FP Type annotation counts as redefinition
2+ # See https://github.com/Semmle/ql/issues/2652
3+
4+ def type_annotation (x ):
5+ foo = 5
6+ if x :
7+ foo : int
8+ do_stuff_with (foo )
9+ else :
10+ foo : float
11+ do_other_stuff_with (foo )
You can’t perform that action at this time.
0 commit comments