Type hints
I don't like that the data dict type is an Any, but this should work
- [x]
Tree - [x]
Context - [x]
filter - [x] Other internal (probably in a different PR)
One quick note: | is supported from Python 3.10. I don’t know about other users, but at least tmt would still support Python 3.9. Therefore you might need to use Union or wrap unions with | with a string (”int | str”) to hide them from Python 3.9 interpreter.
- Rhel8 still uses
3.6, which might be a pain to make it compatible - Rhel9 error is about
|, so yeah should change that toOptionalandUnion - I am not sure if I got the
Contexttyping correct - Should add mypy to the CI in this PR
Should add mypy to the CI in this PR
Absolutely, you can copy the section from tmt's pre-commit configuration, it served there well.
MyPy is up and there are issues to resolve
All tests are green here right now. Any review please?