diff options
author | Claudiu Popa <pcmanticore@gmail.com> | 2019-11-13 08:34:04 +0100 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2019-11-13 08:35:29 +0100 |
commit | 11c190894d09aa92fd135f551e10ebf656bd6f52 (patch) | |
tree | 669eb876fe7d55f3e27e4888bd3f857fda07e6c5 /tests/functional/u | |
parent | 16cb696cba36ae4f8710e7a40ee48f07abbe976c (diff) | |
download | pylint-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.py | 6 |
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 |