I use the typing module. I'd like to always use the code from typing import List, Set, Dict, Tuple, Optional
without stopping to edit that line to reference only the types used in the current module.
But pylint complains "Usused foo imported from typing" for any types not used in this module. I get around that by using from typing import List, Set, Dict, Tuple, Optional # pylint: disable=unused-import
.
Instead of appending # pylint: disable=unused-import
EVERY time I import typing, is there a rule I can put in .pylintrc which means "disable unused-import, ONLY when I'm importing typing"?
I don't want to totally disable unused-import. I just want to disable it when importing from typing.