Add mypy to the pipeline#7383
Add mypy to the pipeline#7383auvipy merged 8 commits intocelery:masterfrom Kludex:typing/annotations-v2
mypy to the pipeline#7383Conversation
This is a simple bootstrap of the process, adding some types to a few selected functions, based on comment annotations. MyPy is chosen as the default static analyzer for the types.
for more information, see https://pre-commit.ci
Codecov Report
@@ Coverage Diff @@
## master #7383 +/- ##
==========================================
- Coverage 89.33% 89.30% -0.03%
==========================================
Files 138 138
Lines 16781 16762 -19
Branches 2451 2451
==========================================
- Hits 14991 14970 -21
- Misses 1559 1560 +1
- Partials 231 232 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
|
This pull request fixes 3 alerts when merging bdee5e0 into 24f22a5 - view on LGTM.com fixed alerts:
|
|
Nice, type hints are much appreciated when navigating the code base. |
|
Yep. As soon as this gets in, I'll organize a similar issue as I did on Then we can start working on it, in an incremental way :) |
|
All the annotations besides |
|
This pull request introduces 2 alerts and fixes 1 when merging e2eda10 into 24f22a5 - view on LGTM.com new alerts:
fixed alerts:
|
|
This pull request fixes 1 alert when merging 7617ec3 into 24f22a5 - view on LGTM.com fixed alerts:
|
|
I've just found out about this: Kludex/uvicorn#1437 (comment) Might be useful for celery as well. |
|
Thanks @auvipy ! :) I'm going to create an issue so we can organize the work towards a fully annotated celery! 🙌 |
|
we can just modify this #7258 |
Thanks @atombrella for the initial work!
This PR adds
mypytotoxand to the pipeline. A couple of differences between this PR and the previous one:pyproject.toml.pyproject.tomlinstead ofmypy.ini.disallow_untyped_defsisTruenow.This PR is intended to be minimal, so we can start working per files basis. I've reused the previous branch, so there are also some small type annotation fixes, which are not required for this PR.