You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should start running mypy in CI (probably in tox "lint" environment). This would enforce type annotation use and would check types at compile time.
Possibly we only want to do this to "new code" like api/ but it might be worth it to add annotations to everything (I'm not sure how much work this is).
Current behavior:
type annotation use is not enforced
types are not checked at compile time
Expected behavior:
new code without type annotations fails CI
types are statically checked: type check failure leads to CI failure
Activity
jku commentedon Apr 7, 2021
I'm not sure if this is a "good first issue" but getting started should not require deep knowledge of tuf.
joshuagl commentedon Apr 7, 2021
Some good pointers in the mypy docs, such as Using mypy with an existing codebase and the import cycles section of the runtime troubles document.
jku commentedon May 11, 2021
I've got a branch, currently blocked on #1378 (it happens to correctly fail a mypy check): https://github.com/jku/tuf/tree/initial-mypy-integration