New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add mypy
to the pipeline
#7383
Add mypy
to the pipeline
#7383
Conversation
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 :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good job
2355aea
to
e2eda10
Compare
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: encode/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
mypy
totox
and to the pipeline. A couple of differences between this PR and the previous one:pyproject.toml
.pyproject.toml
instead ofmypy.ini
.disallow_untyped_defs
isTrue
now.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.