Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add py.typed to make isort PEP-561-compatible #1648

Closed
asfaltboy opened this issue Feb 3, 2021 · 0 comments · Fixed by #1649
Closed

Add py.typed to make isort PEP-561-compatible #1648

asfaltboy opened this issue Feb 3, 2021 · 0 comments · Fixed by #1649
Labels
enhancement New feature or request

Comments

@asfaltboy
Copy link
Contributor

Problem: mypy can't find type hints when importing isort:

$ mypy .
my_module.py:1: error: Skipping analyzing 'isort': found module but no type hints or library stubs
my_module.py:1: note: See https://mypy.readthedocs.io/en/latest/running_mypy.html#missing-imports
Found 1 error in 1 file (checked 608 source files)

Solution: add a py.typed file to make isort PEP-561-compatible
Alternatives: add isort to typeshed, or worser workarounds

Shamelessly snugged the above from psf/black#1316 , the fix can be as simple as psf/black#1395

asfaltboy added a commit to asfaltboy/isort that referenced this issue Feb 3, 2021
asfaltboy added a commit to asfaltboy/isort that referenced this issue Feb 3, 2021
asfaltboy added a commit to asfaltboy/isort that referenced this issue Feb 3, 2021
@timothycrosley timothycrosley added the enhancement New feature or request label Feb 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants