-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
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 <[email protected]>
… `mypy` (GH-133404) (#133603) gh-133403: Type `Tools/build/update_file.py` and check it with `mypy` (GH-133404) (cherry picked from commit 50b52cb) Co-authored-by: sobolevn <[email protected]> Co-authored-by: Zachary Ware <[email protected]>
…t with `mypy` (pythonGH-133404) (cherry picked from commit 50b52cb) Co-authored-by: sobolevn <[email protected]>
…133453) Co-authored-by: Daniil Dumchenko <[email protected]> Co-authored-by: sobolevn <[email protected]>
…mypy (pythonGH-133453) (cherry picked from commit 5f3d3f2) Co-authored-by: Flosckow <[email protected]> Co-authored-by: Daniil Dumchenko <[email protected]> Co-authored-by: sobolevn <[email protected]>
…mypy (pythonGH-133453) (cherry picked from commit 5f3d3f2) Co-authored-by: Flosckow <[email protected]> Co-authored-by: Daniil Dumchenko <[email protected]> Co-authored-by: sobolevn <[email protected]>
… 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 <[email protected]> Co-authored-by: Daniil Dumchenko <[email protected]> Co-authored-by: sobolevn <[email protected]>
… 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 <[email protected]> Co-authored-by: Daniil Dumchenko <[email protected]> Co-authored-by: sobolevn <[email protected]>
…ypy (pythonGH-133735) (cherry picked from commit cd2f234) Co-authored-by: sobolevn <[email protected]>
…H-133802) (cherry picked from commit 7eaa097) Co-authored-by: sobolevn <[email protected]>
…ythonGH-133802) (cherry picked from commit 7eaa097) Co-authored-by: sobolevn <[email protected]>
) (#134038) gh-133403: Check `Tools/build/deepfreeze.py` with mypy (GH-133802) (cherry picked from commit 7eaa097) Co-authored-by: sobolevn <[email protected]>
Hello from PyCon US sprints 👋 |
@chrisgramberg678 thank you! feel free to ping me on PRs :) |
Uh oh!
There was an error while loading. Please reload this page.
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) #133764Tools/build/deepfreeze.py
with mypy #133802Tools/build/deepfreeze.py
with mypy (GH-133802) #134038Tools/build/deepfreeze.py
with mypy (GH-133802) #134040The text was updated successfully, but these errors were encountered: