summaryrefslogtreecommitdiff
path: root/pyflakes/test/test_type_annotations.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyflakes/test/test_type_annotations.py')
-rw-r--r--pyflakes/test/test_type_annotations.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/pyflakes/test/test_type_annotations.py b/pyflakes/test/test_type_annotations.py
index f0fd3b9..396d676 100644
--- a/pyflakes/test/test_type_annotations.py
+++ b/pyflakes/test/test_type_annotations.py
@@ -367,6 +367,13 @@ class TestTypeAnnotations(TestCase):
x = 3
''', m.UnusedVariable)
+ def test_unused_annotation_in_outer_scope_reassigned_in_local_scope(self):
+ self.flakes('''
+ x: int
+ x.__dict__
+ def f(): x = 1
+ ''', m.UndefinedName, m.UnusedVariable)
+
def test_unassigned_annotation_is_undefined(self):
self.flakes('''
name: str