File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -548,6 +548,10 @@ class Annotation(Binding):
548
548
annotation.
549
549
"""
550
550
551
+ def redefines (self , other ):
552
+ """An Annotation doesn't define any name, so it cannot redefine one."""
553
+ return False
554
+
551
555
552
556
class FunctionDefinition (Definition ):
553
557
pass
Original file line number Diff line number Diff line change @@ -283,6 +283,14 @@ def g(t: 'T'): pass
283
283
a: 'a: "A"'
284
284
''' , m .ForwardAnnotationSyntaxError )
285
285
286
+ @skipIf (version_info < (3 , 6 ), 'new in Python 3.6' )
287
+ def test_annotating_an_import (self ):
288
+ self .flakes ('''
289
+ from a import b, c
290
+ b: c
291
+ print(b)
292
+ ''' )
293
+
286
294
@skipIf (version_info < (3 , 6 ), 'new in Python 3.6' )
287
295
def test_unused_annotation (self ):
288
296
# Unused annotations are fine in module and class scope
You can’t perform that action at this time.
0 commit comments