Skip to content

Add typing to more build tools #133403

Open
Open

Activity

added
infraCI, GitHub Actions, buildbots, Dependabot, etc.
type-featureA feature request or enhancement
on May 4, 2025
self-assigned this
on May 4, 2025
added 3 commits that reference this issue on May 4, 2025

pythongh-133403: Type `Tools/build/update_file.py` and check it with …

9b37430

pythongh-133403: Type `Tools/build/update_file.py` and check it with …

acc0ebe

pythongh-133403: Type `Tools/build/update_file.py` and check it with …

63668b0
added a commit that references this issue on May 4, 2025

pythongh-133403: Type `Tools/build/update_file.py` and check it with …

7c10f27
sobolevn

sobolevn commented on May 4, 2025

@sobolevn
MemberAuthor

Tools/build/verify_ensurepip_wheels.py also has annotations, but it is not checked. Will add in a separate PR, since it requires a bit of modification:

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)
                                          
sobolevn

sobolevn commented on May 4, 2025

@sobolevn
MemberAuthor

We should also merge #133405 before any other PR.

Flosckow

Flosckow commented on May 5, 2025

@Flosckow
Contributor

Can I work on it?

sobolevn

sobolevn commented on May 5, 2025

@sobolevn
MemberAuthor

@Flosckow sure, you can help with #133403 (comment) I haven't started yet :)

Thank you!

Flosckow

Flosckow commented on May 5, 2025

@Flosckow
Contributor

@Flosckowконечно, вы можете помочь с #133403 (комментарий) Я еще не начал :)

Спасибо!

Yes, I'll try to do this, the only thing I might be a little slow is this is my first pr in cpython.

sobolevn

sobolevn commented on May 5, 2025

@sobolevn
MemberAuthor

No worries, I can surely help with any questions you might have. Feel free to ask them :)

35 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

infraCI, GitHub Actions, buildbots, Dependabot, etc.type-featureA feature request or enhancement

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Add typing to more build tools · Issue #133403 · python/cpython

    Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

    Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant