Closed slsh1o closed 4 years ago
Slightly reorder mypy.ini
but I'm still not sure how to cure raised errors.
but I'm still not sure how to cure raised errors
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-imports
Try creating a stub file for _scm_version
: https://mypy.readthedocs.io/en/stable/stubs.html.
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 Tuple[str, str]
and automatically decides that it's the final type. You should probably mark it as something like iterable explicitly.
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...
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