Add back pre-commit job for mypy type-checking#6827
Conversation
554a1e9 to
c6ebe31
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6827 +/- ##
==========================================
- Coverage 78.45% 78.44% -0.00%
==========================================
Files 568 568
Lines 43092 43093 +1
==========================================
Hits 33802 33802
- Misses 9290 9291 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| pyproject.toml| | ||
| utils/dependency_management.py | ||
| utils/dependency_management.py| | ||
| environment.yml| |
There was a problem hiding this comment.
If somebody modifies environment.yml manually, this hook should run.
Since we do type checking in this job we need to the lowest supported version otherwise the type checker suggests improvements that are not possible in 3.9.
2c2d927 to
a1e713e
Compare
There was a problem hiding this comment.
Thanks for the PR, I rebased on main and fixed the new type checking error as far as possible. There is an inherent problem in the pydantic model PR #6255 that does not allow a fix of the type checks. We merged the PR as an experimental feature and I marked this as an issue in #6842. @danielhollas Could you review my changes then I merge.
This ensures that mypy does not add suggestions that are not supported by python 3.9 while still being able to use mypy with a higher python version.
If the change is not breaking the 3.9 CI, it should be fine. We maybe take the advantage to upgrade it to newest version to use new features.
2f867ad to
a0b03a8
Compare
|
Sorry for the additional changes but the version change did not work so I had to find a different solution (changing it back at the end^^). I finished now. |
danielhollas
left a comment
There was a problem hiding this comment.
@agoscinski thanks for the rebase and fixes. LGTM with just one comment. Hopefully we can get rid of the type-ignores in later PRs, but for now it's I think important to get this in to prevent further type-checking problems and to unblock other type-checking PRs.
Co-authored-by: Daniel Hollas <danekhollas@gmail.com>
Add back pre-commit CI job that runs all pre-commit hooks, including mypy, see #6831 for details.
Here are mypy failures that are currently present on main:
I wasn't sure how to fix them, as they seem to be false-positives so I just added type-ignores for now.
Closes #6831