What changed, and why it matters
This commit is purely a code-style cleanup. It replaces older Python type-hint syntax (t.Dict, t.Tuple, typing.Iterable) with newer built-in equivalents (dict, tuple, collections.abc.Iterable). No behavior, logic, or security properties of the code were changed.
No security action needed. Treat as routine maintenance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff shows two files modified by an automated style pass. In core/translations/cli.py, t.Dict[str, int] becomes dict[str, int] and t.Tuple[t.TextIO, …] becomes tuple[t.TextIO, …]. In tools/check-insecure-prng.py, typing.Iterable is replaced by collections.abc.Iterable. These are semantically equivalent under Python 3.9+ and do not alter program behavior, data flow, or trust boundaries.
Changed components
core/translations/cli.pytools/check-insecure-prng.pyInspect captured patch +3 / −3
### core/translations/cli.py
@@ -53,7 +53,7 @@ class SignatureFile(t.TypedDict):
def _version_from_version_h() -> VersionTuple:
- defines: t.Dict[str, int] = {}
+ defines: dict[str, int] = {}
with open(VERSION_H) as f:
for line in f:
try:
@@ -438,7 +438,7 @@ def _dict_merge(a: dict, b: dict) -> None:
@cli.command()
@click.argument("update_json", type=click.File("r"), nargs=-1)
-def merge(update_json: t.Tuple[t.TextIO, ...]) -> None:
+def merge(update_json: tuple[t.TextIO, ...]) -> None:
"""Update translations from JSON files."""
tdir = TranslationsDir()
for f in update_json:
### tools/check-insecure-prng.py
@@ -3,8 +3,8 @@
from __future__ import annotations
+from collections.abc import Iterable
from pathlib import Path
-from typing import Iterable
import click
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.