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.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/pyflakes/test/test_type_annotations.py b/pyflakes/test/test_type_annotations.py
index bebdef7..676a4a5 100644
--- a/pyflakes/test/test_type_annotations.py
+++ b/pyflakes/test/test_type_annotations.py
@@ -39,6 +39,23 @@ class TestTypeAnnotations(TestCase):
return s
""")
+ def test_typingExtensionsOverload(self):
+ """Allow intentional redefinitions via @typing_extensions.overload"""
+ self.flakes("""
+ from typing_extensions import overload
+
+ @overload
+ def f(s): # type: (None) -> None
+ pass
+
+ @overload
+ def f(s): # type: (int) -> int
+ pass
+
+ def f(s):
+ return s
+ """)
+
def test_overload_with_multiple_decorators(self):
self.flakes("""
from typing import overload