gh-139590: Stricter ruff rules for Tools/wasm (#139752)

This commit is contained in:
sobolevn 2025-10-09 01:13:27 +03:00 committed by GitHub
parent a2850a3a91
commit 678e0b818c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 14 additions and 17 deletions

View file

@ -15,7 +15,6 @@
import sys
import sysconfig
import zipfile
from typing import Dict
# source directory
SRCDIR = pathlib.Path(__file__).parents[3].absolute()
@ -134,7 +133,7 @@ def filterfunc(filename: str) -> bool:
pzf.writepy(entry, filterfunc=filterfunc)
def detect_extension_modules(args: argparse.Namespace) -> Dict[str, bool]:
def detect_extension_modules(args: argparse.Namespace) -> dict[str, bool]:
modules = {}
# disabled by Modules/Setup.local ?
@ -149,7 +148,7 @@ def detect_extension_modules(args: argparse.Namespace) -> Dict[str, bool]:
# disabled by configure?
with open(args.sysconfig_data) as f:
data = f.read()
loc: Dict[str, Dict[str, str]] = {}
loc: dict[str, dict[str, str]] = {}
exec(data, globals(), loc)
for key, value in loc["build_time_vars"].items():