-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
Add typing to more build tools #133403
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
Comments
Tools/build/verify_ensurepip_wheels.py:41: error: Argument 1 to "print_error" has
incompatible type "Path"; expected "str" [arg-type]
print_error(p, f"Found more than one wheel for package {package_n...
^
Tools/build/verify_ensurepip_wheels.py:56: error: Argument 1 to "print_error" has
incompatible type "Path"; expected "str" [arg-type]
package_path,
^~~~~~~~~~~~
Tools/build/verify_ensurepip_wheels.py:66: error: Argument 1 to "print_error" has
incompatible type "Path"; expected "str" [arg-type]
print_error(package_path, f"Could not fetch JSON metadata for {package_na...
^~~~~~~~~~~~
Tools/build/verify_ensurepip_wheels.py:76: error: Argument 1 to "print_error" has
incompatible type "Path"; expected "str" [arg-type]
print_error(package_path, f"No digest for {package_name} found from PyPI....
^~~~~~~~~~~~
Tools/build/verify_ensurepip_wheels.py:82: error: Name "expected_digest" may be undefined
[possibly-undefined]
print(f"Expected digest: {expected_digest}")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Tools/build/verify_ensurepip_wheels.py:87: error: Argument 1 to "print_error" has
incompatible type "Path"; expected "str" [arg-type]
package_path, f"Failed to verify the checksum of the {package_name} w...
^~~~~~~~~~~~
Tools/build/verify_ensurepip_wheels.py:92: error: Argument 1 to "print_notice" has
incompatible type "Path"; expected "str" [arg-type]
package_path,
^~~~~~~~~~~~
Found 7 errors in 1 file (checked 4 source files)
|
We should also merge #133405 before any other PR. |
Can I work on it? |
@Flosckow sure, you can help with #133403 (comment) I haven't started yet :) Thank you! |
Yes, I'll try to do this, the only thing I might be a little slow is this is my first pr in cpython. |
No worries, I can surely help with any questions you might have. Feel free to ask them :) |
…`mypy` (pythonGH-133404) (cherry picked from commit 50b52cb) Co-authored-by: sobolevn <mail@sobolevn.me>
…t with `mypy` (pythonGH-133404) (cherry picked from commit 50b52cb) Co-authored-by: sobolevn <mail@sobolevn.me>
…133453) Co-authored-by: Daniil Dumchenko <dumchenko.de@sibvaleo.com> Co-authored-by: sobolevn <mail@sobolevn.me>
…mypy (pythonGH-133453) (cherry picked from commit 5f3d3f2a6c8ddf7a6be340c3f4c696e2a5eb51f0) Co-authored-by: Flosckow <66554425+Flosckow@users.noreply.github.com> Co-authored-by: Daniil Dumchenko <dumchenko.de@sibvaleo.com> Co-authored-by: sobolevn <mail@sobolevn.me>
…mypy (pythonGH-133453) (cherry picked from commit 5f3d3f2) Co-authored-by: Flosckow <66554425+Flosckow@users.noreply.github.com> Co-authored-by: Daniil Dumchenko <dumchenko.de@sibvaleo.com> Co-authored-by: sobolevn <mail@sobolevn.me>
… mypy (GH-133453) (#133690) gh-133403: Check `Tools/build/verify_ensurepip_wheels.py` with mypy (GH-133453) (cherry picked from commit 5f3d3f2) Co-authored-by: Flosckow <66554425+Flosckow@users.noreply.github.com> Co-authored-by: Daniil Dumchenko <dumchenko.de@sibvaleo.com> Co-authored-by: sobolevn <mail@sobolevn.me>
… mypy (GH-133453) (#133689) gh-133403: Check `Tools/build/verify_ensurepip_wheels.py` with mypy (GH-133453) (cherry picked from commit 5f3d3f2) Co-authored-by: Flosckow <66554425+Flosckow@users.noreply.github.com> Co-authored-by: Daniil Dumchenko <dumchenko.de@sibvaleo.com> Co-authored-by: sobolevn <mail@sobolevn.me>
…ypy (pythonGH-133735) (cherry picked from commit cd2f234) Co-authored-by: sobolevn <mail@sobolevn.me>
Feature or enhancement
Right now we support typing in several build tools:
cpython/Tools/build/mypy.ini
Lines 2 to 4 in 6ce60f1
I think that some other files / tools from this folder can benefit from being checked with mypy.
I have a PR ready for
Tools/build/update_file.py
ofparser.c
generation.What else can be easily typed?
Linked PRs
Tools/build/update_file.py
and check it withmypy
#133404Tools/build/update_file.py
and check it withmypy
(GH-133404) #133603Tools/build/update_file.py
and check it withmypy
(GH-133404) #133637Tools/build/verify_ensurepip_wheels.py
with mypy (GH-133453) #133689Tools/build/verify_ensurepip_wheels.py
with mypy (GH-133453) #133690Tools/build/generate-build-details.py
with mypy #133735Tools/build/generate-build-details.py
with mypy (GH-133735) #133764The text was updated successfully, but these errors were encountered: