summaryrefslogtreecommitdiff
path: root/tests/functional/u
diff options
context:
space:
mode:
authorClaudiu Popa <pcmanticore@gmail.com>2019-11-13 08:34:04 +0100
committerClaudiu Popa <pcmanticore@gmail.com>2019-11-13 08:35:29 +0100
commit11c190894d09aa92fd135f551e10ebf656bd6f52 (patch)
tree669eb876fe7d55f3e27e4888bd3f857fda07e6c5 /tests/functional/u
parent16cb696cba36ae4f8710e7a40ee48f07abbe976c (diff)
downloadpylint-git-11c190894d09aa92fd135f551e10ebf656bd6f52.tar.gz
Relax type import detection for names that do not come from the ``typing`` module
Close #3191
Diffstat (limited to 'tests/functional/u')
-rw-r--r--tests/functional/u/unused_typing_imports.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/functional/u/unused_typing_imports.py b/tests/functional/u/unused_typing_imports.py
index 4c122a622..c0a2f4986 100644
--- a/tests/functional/u/unused_typing_imports.py
+++ b/tests/functional/u/unused_typing_imports.py
@@ -7,6 +7,7 @@ which means we were never processing them.
import re
import typing
+from collections import defaultdict
from datetime import datetime
from typing import (
Any,
@@ -70,3 +71,8 @@ def magic(alpha, beta, gamma):
# type: (str, Optional[str], Optional[datetime]) -> Any
"""going strong"""
return alpha, beta, gamma
+
+
+def unused_assignment_import():
+ foo_or_bar = defaultdict(int) # type: defaultdict
+ return foo_or_bar