vscode-python-typehint icon indicating copy to clipboard operation
vscode-python-typehint copied to clipboard

Auto import `typing` module when a type hint is used from this module

Open mohammed-safwan opened this issue 4 years ago • 1 comments

Would it be possible to automatically add import typing to the import section of the Python script when a type hint is used from typing module?

mohammed-safwan avatar Nov 21 '21 11:11 mohammed-safwan

@mohammed-safwan I like the idea but don't know if it's possible via the extension API. I'm open to pull requests on this from anyone interested, or might look into it myself otherwise.

It would be nice to have as a setting also so it can be disabled.

njqdev avatar Dec 12 '21 12:12 njqdev