refactor: one keyword-option guard in core

This commit is contained in:
Abdessamad Derraz committed 2026-11-18 13:47:56 +01:00
1 parent 27330be60a
commit b4573d310b
13 files changed
+42 -44

No files matched your search

+1 -8
View File
@@ -7,7 +7,7 @@ import os
import shutil
import tempfile
import zipfile
from collections.abc import Iterator, Mapping
from collections.abc import Iterator
from dataclasses import dataclass, field
from pathlib import Path
@@ -18,13 +18,6 @@ from core.paths import sanitize_pack_path
from packs.paths import _has_path_conflict, _register_path, placement_block
def _reject_unknown(function: str, options: Mapping[str, object], known: frozenset[str]) -> None:
"""Refuse a keyword the options do not declare, as a named parameter would."""
for key in options:
if key not in known:
raise TypeError(f"{function}() got an unexpected keyword argument '{key}'")
# Formats that are already compressed: deflating them again took 28 s of the
# RetroArch build for 2.1 GB of members and saved 9.6 MB (0.45 %), 16 GB and
# about 72 MB across all packs. Measured per extension on the 2026-10-20