refactor: drop comments that restate the code

Thirty one-line labels in verify.py, generate_site.py and
generate_truth.py named the statement under them ("# Load registry",
"# Copy branding assets"). Comments that give a reason stay, as do the
module section headers. A test reads the three files for new ones.
This commit is contained in:
Abdessamad Derraz committed 2026-10-21 06:20:50 +02:00
1 parent 3613c0927b
commit 76e44a74b4
4 files changed
+28 -32

No files matched your search

-4
View File
@@ -72,12 +72,10 @@ def parse_args(argv: list[str] | None = None) -> argparse.Namespace:
def main(argv: list[str] | None = None) -> None:
args = parse_args(argv)
# Load registry
registry_path = os.path.join(args.platforms_dir, "_registry.yml")
with open(registry_path) as f:
registry = (yaml_load(f) or {}).get("platforms", {})
# Load emulator profiles
profiles = load_emulator_profiles(args.emulators_dir)
# Load database (optional)
@@ -86,7 +84,6 @@ def main(argv: list[str] | None = None) -> None:
if args.db != DEFAULT_DB_FILE or os.path.exists(args.db):
db = load_database(args.db)
# Determine platforms
if args.all:
platforms = list_registered_platforms(
args.platforms_dir,
@@ -108,7 +105,6 @@ def main(argv: list[str] | None = None) -> None:
output_dir, [name], args.target, args.platforms_dir
)
os.makedirs(output_dir, exist_ok=True)
# Resolve target cores
target_cores: set[str] | None = None
if args.target:
try: