You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to run the latest mypy on a sphinx extension I am writing and mypy is giving the error:
error: Cannot find module named 'sphinx'
However looking at the source code for a lot of sphinx, it appears much of the code includes type annotations. The mypy docs state that if source code includes annotations in the source then a package can be made PEP-561 compatible by adding a py.typed file.
I tried this myself by adding a py.typed file to the sphinx directory in my site-packages and now mypy is happy.
I'm trying to run the latest mypy on a sphinx extension I am writing and mypy is giving the error:
error: Cannot find module named 'sphinx'
However looking at the source code for a lot of sphinx, it appears much of the code includes type annotations. The mypy docs state that if source code includes annotations in the source then a package can be made PEP-561 compatible by adding a
py.typed
file.I tried this myself by adding a
py.typed
file to thesphinx
directory in mysite-packages
and now mypy is happy.This may be related to #4824
The text was updated successfully, but these errors were encountered: