mirror of
https://github.com/github/codeql.git
synced 2026-05-02 04:05:14 +02:00
Python: Add FN for py/unused-import
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
| import_structure_2.py:6:1:6:23 | Import | Import of 'bar' is not used. |
|
||||
| imports_test.py:2:1:2:23 | Import | Import of 'module2' is not used. |
|
||||
| imports_test.py:6:1:6:12 | Import | Import of 'cycle' is not used. |
|
||||
| imports_test.py:10:1:10:22 | Import | Import of 'top_level_cycle' is not used. |
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
# there should be no difference whether you import 2 things on 1 line, or use 2
|
||||
# lines
|
||||
from typing import Optional
|
||||
|
||||
from unknown import foo, bar
|
||||
|
||||
|
||||
var: Optional['foo'] = None
|
||||
@@ -0,0 +1,8 @@
|
||||
# there should be no difference whether you import 2 things on 1 line, or use 2
|
||||
# lines
|
||||
from typing import Optional
|
||||
|
||||
from unknown import foo
|
||||
from unknown import bar
|
||||
|
||||
var: Optional['foo'] = None
|
||||
Reference in New Issue
Block a user