Python: Add FN for py/unused-import

This commit is contained in:
Rasmus Wriedt Larsen
2020-04-07 09:26:14 +02:00
parent 6685a5ed4d
commit 1077ce3a35
3 changed files with 17 additions and 0 deletions

View File

@@ -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. |

View File

@@ -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

View File

@@ -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