]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] gh-133403: Check `Tools/build/verify_ensurepip_wheels.py` with mypy (GH-133453...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 8 May 2025 18:17:43 +0000 (20:17 +0200)
committerGitHub <noreply@github.com>
Thu, 8 May 2025 18:17:43 +0000 (18:17 +0000)
gh-133403: Check `Tools/build/verify_ensurepip_wheels.py` with mypy (GH-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>
.github/workflows/mypy.yml
Tools/build/mypy.ini
Tools/build/verify_ensurepip_wheels.py

index 908daaf3a6019a5aaae8cc984cf3d319b5ad5cfe..cb5349bb7d4dc053c03d25b2ccedba989a930f9b 100644 (file)
@@ -13,7 +13,10 @@ on:
       - "Lib/test/libregrtest/**"
       - "Lib/tomllib/**"
       - "Misc/mypy/**"
+      - "Tools/build/compute-changes.py"
       - "Tools/build/generate_sbom.py"
+      - "Tools/build/verify_ensurepip_wheels.py"
+      - "Tools/build/update_file.py"
       - "Tools/cases_generator/**"
       - "Tools/clinic/**"
       - "Tools/jit/**"
index db546c6fb3481c621e248d14b47ec2cb11c6d8c2..fab35bf68904af4b24d5bb534a0485349876c545 100644 (file)
@@ -1,7 +1,11 @@
 [mypy]
+
+# Please, when adding new files here, also add them to:
+# .github/workflows/mypy.yml
 files =
     Tools/build/compute-changes.py,
     Tools/build/generate_sbom.py,
+    Tools/build/verify_ensurepip_wheels.py,
     Tools/build/update_file.py
 
 pretty = True
index a37da2f70757e58ad814788117cae4e2232a35cd..46c42916d9354da7ce8b70414de8877fecbeec62 100755 (executable)
@@ -20,13 +20,13 @@ ENSURE_PIP_INIT_PY_TEXT = (ENSURE_PIP_ROOT / "__init__.py").read_text(encoding="
 GITHUB_ACTIONS = os.getenv("GITHUB_ACTIONS") == "true"
 
 
-def print_notice(file_path: str, message: str) -> None:
+def print_notice(file_path: str | Path, message: str) -> None:
     if GITHUB_ACTIONS:
         message = f"::notice file={file_path}::{message}"
     print(message, end="\n\n")
 
 
-def print_error(file_path: str, message: str) -> None:
+def print_error(file_path: str | Path, message: str) -> None:
     if GITHUB_ACTIONS:
         message = f"::error file={file_path}::{message}"
     print(message, end="\n\n")
@@ -67,6 +67,7 @@ def verify_wheel(package_name: str) -> bool:
         return False
 
     release_files = json.loads(raw_text)["releases"][package_version]
+    expected_digest = ""
     for release_info in release_files:
         if package_path.name != release_info["filename"]:
             continue
@@ -95,6 +96,7 @@ def verify_wheel(package_name: str) -> bool:
     return True
 
 
+
 if __name__ == "__main__":
     exit_status = int(not verify_wheel("pip"))
     raise SystemExit(exit_status)