Open Secrus opened 1 year ago
Since we already support only >=3.7
, annotations should be in source. Personally I am still waiting for co_annotations
, but if you are able to also support the later conversion, using annotations
should be fine when it’s useful. And yes a type-checking job should be added if type hints are added. It’s probably a good chance to switch to pre-commit hooks.
Don't know how the co_annotations
syntax will be different, but sure, I can take care of the later conversion. As to mypy
as pre-commit hook, it only runs on one Python version, while the issues can be different between Python versions, so I would rather add it as a CI step (or tox entry since I see this is what you are using here).
Mypy has a --python-version
flag you can use to switch the Python version it checks against. And running type checks against the lowest supported version is good enough in practice.
Hi. Are the maintainers open to accepting the addition of type annotations to this project? I am willing to do the work that's needed. If the answer is yes, a few extra questions:
.pyi
files?from __future__ import annotations
import way (newer, nicer typing syntax) or should I go with "classic" type classes from thetyping
module?