Repository navigation
Add typing to more build tools #133403
Copy link
Copy link
Closed
Labels
infraCI, GitHub Actions, buildbots, Dependabot, etc.CI, GitHub Actions, buildbots, Dependabot, etc.type-featureA feature request or enhancementA feature request or enhancement
Description
Feature or enhancement
Right now we support typing in several build tools:
Lines 2 to 4 in 6ce60f1
| files = | |
| Tools/build/compute-changes.py, | |
| Tools/build/generate_sbom.py |
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 of parser.c generation.
What else can be easily typed?
Linked PRs
- gh-133403: Type
Tools/build/update_file.pyand check it withmypy#133404 - gh-133403: Type Tools/build/verify_ensurepip_wheels.py and check it with mypy #133453
- [3.14] gh-133403: Type
Tools/build/update_file.pyand check it withmypy(GH-133404) #133603 - [3.13] gh-133403: Type
Tools/build/update_file.pyand check it withmypy(GH-133404) #133637 - [3.14] gh-133403: Check
Tools/build/verify_ensurepip_wheels.pywith mypy (GH-133453) #133689 - [3.13] gh-133403: Check
Tools/build/verify_ensurepip_wheels.pywith mypy (GH-133453) #133690 - gh-133403: Check
Tools/build/generate-build-details.pywith mypy #133735 - [3.14] gh-133403: Check
Tools/build/generate-build-details.pywith mypy (GH-133735) #133764 - gh-133403: Check
Tools/build/deepfreeze.pywith mypy #133802 - [3.14] gh-133403: Check
Tools/build/deepfreeze.pywith mypy (GH-133802) #134038 - [3.13] gh-133403: Check
Tools/build/deepfreeze.pywith mypy (GH-133802) #134040 - gh-133403: Check
generate_stdlib_module_namesandcheck_extension_moduleswith mypy #137546 - [3.14] gh-133403: Check
generate_stdlib_module_namesandcheck_extension_moduleswith mypy (GH-137546) #137679 - [3.13] gh-133403: Check
generate_stdlib_module_namesandcheck_extension_moduleswith mypy (GH-137546) #137691 - gh-133403: Run
mypyonTools/build/mypy.inichanges #137692 - [3.14] gh-133403: Run
mypyonTools/build/mypy.inichanges (GH-137692) #137698 - [3.13] gh-133403: Run
mypyonTools/build/mypy.inichanges (GH-137692) #137699 - gh-133403: Run
mypyonTools/build/check_warnings.py#137700 - [3.14] gh-133403: Run
mypyonTools/build/check_warnings.py(GH-137700) #137763 - gh-133403: Add type annotations to generate_levenshtein_examples.py #143317
- [3.14] gh-133403: Add type annotations to generate_levenshtein_examples.py (GH-143317) #148734
Reactions are currently unavailable
Metadata
Metadata
Labels
infraCI, GitHub Actions, buildbots, Dependabot, etc.CI, GitHub Actions, buildbots, Dependabot, etc.type-featureA feature request or enhancementA feature request or enhancement
Activity
pythongh-133403: Type `Tools/build/update_file.py` and check it with …
pythongh-133403: Type `Tools/build/update_file.py` and check it with …
pythongh-133403: Type `Tools/build/update_file.py` and check it with …
pythongh-133403: Type `Tools/build/update_file.py` and check it with …
sobolevn commentedon May 4, 2025
Tools/build/verify_ensurepip_wheels.pyalso has annotations, but it is not checked. Will add in a separate PR, since it requires a bit of modification:sobolevn commentedon May 4, 2025
We should also merge #133405 before any other PR.
Flosckow commentedon May 5, 2025
Can I work on it?
sobolevn commentedon May 5, 2025
@Flosckow sure, you can help with #133403 (comment) I haven't started yet :)
Thank you!
Flosckow commentedon May 5, 2025
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 commentedon May 5, 2025
No worries, I can surely help with any questions you might have. Feel free to ask them :)
pythongh-133403: Type Tools/build/verify_ensurepip_wheels.py and chec…
51 remaining items
[3.14] gh-133403: Run `mypy` on `Tools/build/check_warnings.py` (GH-1…
[3.14] pythongh-133403: Check `generate_stdlib_module_names` and `che…
[3.14] pythongh-133403: Run `mypy` on `Tools/build/mypy.ini` changes (p…
[3.14] pythongh-133403: Run `mypy` on `Tools/build/check_warnings.py` (…
pythongh-133403: Add type annotations to generate_levenshtein_example…
Add NEWS entry for pythongh-133403
pythongh-133403: Add type annotations to generate_levenshtein_example…
RafaelWO commentedon Feb 1, 2026
Hey there, I also would like to help out and add typing to more of the build scripts.
Currently, the following script are not yet checked by mypy:
Are there any scripts that don't need typing? Otherwise, I would start with
Tools/build/generate_re_casefix.py.picnixz commentedon Feb 1, 2026
It depends on whether the codeowner/maintainer of those modules want such additions and whether adding them brings real value.
gh-133403: Add type annotations to generate_levenshtein_examples.py (#…
pythongh-133403: Add type annotations to generate_levenshtein_example…
[3.14] gh-133403: Add type annotations to generate_levenshtein_exampl…
pythongh-133403: Add type annotations to generate_levenshtein_example…
StanFromIreland commentedon Aug 27, 2026
I'm closing this, let's create new issues for the remaining tools so that decisions can be made on a case-by-case basis.