mirror of
https://github.com/github/codeql.git
synced 2026-04-28 10:15:14 +02:00
Python: Add false negative test case.
This commit is contained in:
@@ -9,3 +9,8 @@ def type_annotation(x):
|
||||
else:
|
||||
foo : float
|
||||
do_other_stuff_with(foo)
|
||||
|
||||
def type_annotation_fn():
|
||||
# False negative: the value of `bar` is never used, but this is masked by the presence of the type annotation.
|
||||
bar = 5
|
||||
bar : int
|
||||
|
||||
Reference in New Issue
Block a user