-
Notifications
You must be signed in to change notification settings - Fork 12
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
tracker: enforce typings and enable mypy checks in github actions #226
Comments
Currently mypy has detected 70 errors:
A stricter check shows 206 errors
|
Yep have already discussed this with him and he said I can take over.
Yes, I am tracking each file and will probably have separate PRs for files with too many fixes |
@shubhbapna let me know if you need help with this / want me to pick some files (since the list is large) |
Sure feel free to take any file |
@dhellmann why do we have this constraint on pyproject_hooks?
The 1.1.0 version comes with typings |
I probably copied that blindly from somewhere else. I don't know of any reason 1.1.0 wouldn't work. Remove the constraint and see what happens? |
Figured out why we need that constraint. 1.1.0 causes a regression: pypa/pyproject-hooks#192 |
We should have a comment in our requirements list with a link to that bug so we can remember why the exclusion is there next time someone asks. :-) |
- move `mypy` extras into a requirements file - install `types-tqdm` to fix mypy error in progress.py - use a different TOML style for optional-dependencies - tox: install extra dependencies with `extras` See: python-wheel-build#226 Signed-off-by: Christian Heimes <cheimes@redhat.com>
The `sources.resolve_dist()` function returns `tuple[str | None, Version]`, not `tuple[str, str]`. The fix will allow me to enable type checking in our builder repo. See: python-wheel-build#226 Signed-off-by: Christian Heimes <cheimes@redhat.com>
The `sources.resolve_dist()` function returns `tuple[str | None, Version]`, not `tuple[str, str]`. The fix will allow me to enable type checking in our builder repo. See: python-wheel-build#226 Signed-off-by: Christian Heimes <cheimes@redhat.com>
Thanks to Shubh's relentless work, most files now pass MyPy type checker. It's time to ensure that new code does not introduce regressions. - enforce successful MyPy runs in `tox.ini` and GitHub Actions - ignore MyPy errors in files with known issues - fix a bunch of low hanging fruits in tests See: python-wheel-build#226 Signed-off-by: Christian Heimes <cheimes@redhat.com>
PR #282 enforces MyPy checks and ignores errors in files with known issues. |
Thanks to Shubh's relentless work, most files now pass MyPy type checker. It's time to ensure that new code does not introduce regressions. - enforce successful MyPy runs in `tox.ini` and GitHub Actions - ignore MyPy errors in files with known issues - fix a bunch of low hanging fruits in tests See: python-wheel-build#226 Signed-off-by: Christian Heimes <cheimes@redhat.com>
We have already been seeing type mismatch of between what is being passed to a function vs what the function parameter expects especially in the case of
version
where we have been passing strings as well asVersion
objects.Enforcing types will help us sync everything and should prevent similar future issues.
After all of the above are done:
invoke
. Check if type hints are working whereverinvoke
is being called.extra_environ
todict[str, str]
*args
and**kwargs
annotation to only type the item / valueVersion
objectThe text was updated successfully, but these errors were encountered: