◐ Shell
clean mode source ↗

ci: check types with mypy by muggenhor · Pull Request #1226 · gitpython-developers/GitPython

@muggenhor changed the title ci: check types with mypy on CI ci: check types with mypy

Apr 23, 2021
Without the presence of 'test-requirements.txt' 'tox' is unusable.
Because there's too many to fix quickly.
This gives mypy all information that it needs to determine what the
return type of a function call is *iff* it knows the argument's type.

As a result it can now stop complaining about passing None to str.join()
in exc.py.
By telling it where it's imported from in one case and telling it to
ignore it in another.
This will result in _partial_ type checking of the type annotations by
using mypy. Keep in mind though that mypy is performing _static_
analysis in a _dynamic_ language so it can only partially check for
correctness.

Some other tool(s) will be needed to have more complete type checking at
runtime. E.g. [typeguard].

[typeguard]: https://pypi.org/project/typeguard/

@Byron Byron mentioned this pull request

Apr 23, 2021

3 tasks