Migrate back to mypy and enable typechecking in CI#2595
Migrate back to mypy and enable typechecking in CI#2595VeckoTheGecko merged 7 commits intoParcels-code:mainfrom
Conversation
This reverts commit 831c43d.
Add file exclusions (to be worked on then removed)
for more information, see https://pre-commit.ci
erikvansebille
left a comment
There was a problem hiding this comment.
Changes look good. What will the workflow be? Will we get errors when pushing PRs that fail type checking? Or will the process be more graceful?
Yes, we will get errors that fail typechecking. Type checking will be like unit tests in this regard. Devs will need to be familiar to some extent with how typechecking in Python works (how to fix and how to supress warnings), or maintainers will need to push edits to fix the typing should contributions mis-specify them |
You can do I realise I need to review the contributing instructions. Will do so before merging. |
Just reviewed these. They're already up to date. |
Description
xref #2540
After trying out
tysome more, I think it's best if we go for mypy. It has better support in the ecosysytem, and ty was flagging a lot of 'errors' within xarray internals causing noise.Changes:
mypyin CI (i.e., we will get red crosses if it fails)Checklist