fix: keep release checks importable on python 3.9

check_release_assets.py built a tuple[..., int | None] alias at import, a TypeError on the 3.9 floor tools.md states, and check_release.py imports it. A test reads every script for unions and match statements evaluated at runtime.
This commit is contained in:
Abdessamad Derraz committed 2026-10-21 09:51:33 +02:00
1 parent 0242dc77ee
commit 9bb3dfbd1b
2 files changed
+53 -1

No files matched your search

+3 -1
View File
@@ -22,6 +22,7 @@ import re
import subprocess
import sys
from collections.abc import Iterable
from typing import Optional, Tuple
sys.path.insert(0, os.path.dirname(__file__))
from common import composition_tier, load_database
@@ -32,7 +33,8 @@ from largefiles import (
registered_paths,
)
Finding = tuple[str, str, int, int | None]
# Evaluated at import, where `int | None` needs Python 3.10.
Finding = Tuple[str, str, int, Optional[int]]
def expected_assets(db: dict, gitignore_text: str) -> dict[str, int]: