-
-
Notifications
You must be signed in to change notification settings - Fork 18
Add mypy hook to pre-commit
#33
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
Conversation
b3c5fba to
4276eeb
Compare
|
Slightly reorder |
First, try exploring what causes these errors. Then, we'll decide how to deal with each of them. |
src/sphinxcontrib/towncrier/_version.py:5: error: Cannot find implementation or library stub for module named 'towncrier._scm_version'
src/sphinxcontrib/towncrier/_version.py:5: note: See https://mypy.readthedocs.io/en/latest/running_mypy.html#missing-importsTry creating a stub file for |
src/sphinxcontrib/towncrier/__init__.py:55: error: Incompatible types in assignment (expression has type "Tuple[str, str, str, str]", variable has type "Tuple[str, str]")I guess mypy "sees" the initial declaration that is |
src/sphinxcontrib/towncrier/__init__.py:80: error: "Dict[str, Any]" has no attribute "release"
src/sphinxcontrib/towncrier/__init__.py:82: error: "Dict[str, Any]" has no attribute "version"This is just an incorrect annotation. It's best to figure out what type it is really. Maybe stick a debugger there... |
85df242 to
f62f6a5
Compare
f62f6a5 to
a2908a4
Compare
Co-authored-by: Sviatoslav Sydorenko <[email protected]>
10a0b9c to
cdefe50
Compare
I'm not sure what else should I add to
mypy.ini. Something related to tests or maybe to sphinx.And also there are some errors which idk how to fix better.
Ref: #16