mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-18 09:23:26 -05:00
fix: refuse abbreviated flags in every script
argparse completed a prefix into the only flag starting with it: slots.py --emulator read profiles from a directory named after the emulator and reported nothing, and pipeline.py --all built every pack variant. Every parser now refuses an abbreviation.
This commit is contained in:
1 parent
88a3bb8953
commit
e1b6aad51b
53 files changed
+79
-33
No files matched your search
@@ -320,7 +320,7 @@ def scraper_cli(
|
||||
"""Shared CLI entry point for all scrapers. Eliminates main() boilerplate."""
|
||||
import argparse
|
||||
|
||||
parser = argparse.ArgumentParser(description=description)
|
||||
parser = argparse.ArgumentParser(allow_abbrev=False, description=description)
|
||||
parser.add_argument("--dry-run", action="store_true", help="Show scraped data")
|
||||
parser.add_argument("--output", "-o", help="Output YAML file")
|
||||
parser.add_argument("--json", action="store_true", help="Output as JSON")
|
||||
|
||||
@@ -308,6 +308,7 @@ def main() -> None:
|
||||
import argparse
|
||||
|
||||
parser = argparse.ArgumentParser(
|
||||
allow_abbrev=False,
|
||||
description="Scrape libretro-core-info firmware requirements"
|
||||
)
|
||||
parser.add_argument("--dry-run", action="store_true")
|
||||
|
||||
@@ -91,7 +91,7 @@ def import_pack(source: str, pack: Path) -> tuple[dict, list[dict], int]:
|
||||
|
||||
|
||||
def main() -> int:
|
||||
parser = argparse.ArgumentParser(description="Import BIOS provenance from a DAT pack")
|
||||
parser = argparse.ArgumentParser(allow_abbrev=False, description="Import BIOS provenance from a DAT pack")
|
||||
parser.add_argument("--source", required=True, choices=SOURCES)
|
||||
parser.add_argument("--pack", required=True, help="DAT pack (ZIP or directory)")
|
||||
parser.add_argument("--output", "-o", help="Snapshot output path")
|
||||
|
||||
@@ -303,6 +303,7 @@ def run(
|
||||
|
||||
def main() -> None:
|
||||
parser = argparse.ArgumentParser(
|
||||
allow_abbrev=False,
|
||||
description="Scrape FBNeo BIOS set hashes from upstream source",
|
||||
)
|
||||
parser.add_argument(
|
||||
|
||||
@@ -421,6 +421,7 @@ def _write_release(args: argparse.Namespace) -> None:
|
||||
|
||||
def build_parser() -> argparse.ArgumentParser:
|
||||
parser = argparse.ArgumentParser(
|
||||
allow_abbrev=False,
|
||||
prog="mame_hash_scraper",
|
||||
description="Fetch MAME BIOS hashes from source and merge into profiles.",
|
||||
)
|
||||
|
||||
@@ -83,7 +83,7 @@ def fetch_snapshot() -> tuple[dict, list[dict]]:
|
||||
|
||||
|
||||
def main() -> int:
|
||||
parser = argparse.ArgumentParser(description="Fetch Redump BIOS DAT provenance")
|
||||
parser = argparse.ArgumentParser(allow_abbrev=False, description="Fetch Redump BIOS DAT provenance")
|
||||
parser.add_argument("--dry-run", action="store_true", help="Show fetched entries")
|
||||
parser.add_argument(
|
||||
"--output", "-o", default="provenance/redump.json", help="Snapshot output path"
|
||||
|
||||
@@ -443,7 +443,7 @@ def _listxml_opener(pack: Path) -> Callable[[], io.BufferedIOBase]:
|
||||
|
||||
|
||||
def main() -> int:
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
parser = argparse.ArgumentParser(allow_abbrev=False, description=__doc__)
|
||||
parser.add_argument("--source", choices=SOURCES, required=True)
|
||||
parser.add_argument("--pack", help="DAT file, ZIP or directory")
|
||||
parser.add_argument(
|
||||
|
||||
@@ -430,6 +430,7 @@ class Scraper(BaseTargetScraper):
|
||||
|
||||
def main() -> None:
|
||||
parser = argparse.ArgumentParser(
|
||||
allow_abbrev=False,
|
||||
description="Scrape Batocera per-board emulator targets"
|
||||
)
|
||||
parser.add_argument("--dry-run", action="store_true", help="Show target summary")
|
||||
|
||||
@@ -166,7 +166,7 @@ class Scraper(BaseTargetScraper):
|
||||
|
||||
|
||||
def main() -> None:
|
||||
parser = argparse.ArgumentParser(description="Scrape EmuDeck emulator targets")
|
||||
parser = argparse.ArgumentParser(allow_abbrev=False, description="Scrape EmuDeck emulator targets")
|
||||
parser.add_argument("--dry-run", action="store_true", help="Show target summary")
|
||||
parser.add_argument("--output", "-o", help="Output YAML file")
|
||||
args = parser.parse_args()
|
||||
|
||||
@@ -104,7 +104,7 @@ class Scraper(BaseTargetScraper):
|
||||
|
||||
|
||||
def main() -> None:
|
||||
parser = argparse.ArgumentParser(description="Scrape Recalbox per-board cores")
|
||||
parser = argparse.ArgumentParser(allow_abbrev=False, description="Scrape Recalbox per-board cores")
|
||||
parser.add_argument("--dry-run", action="store_true", help="Show target summary")
|
||||
parser.add_argument("--output", "-o", help="Output YAML file")
|
||||
args = parser.parse_args()
|
||||
|
||||
@@ -168,6 +168,7 @@ class Scraper(BaseTargetScraper):
|
||||
|
||||
def main() -> None:
|
||||
parser = argparse.ArgumentParser(
|
||||
allow_abbrev=False,
|
||||
description="Scrape RetroArch buildbot nightly targets"
|
||||
)
|
||||
parser.add_argument("--dry-run", action="store_true", help="Show target summary")
|
||||
|
||||
@@ -177,6 +177,7 @@ class Scraper(BaseTargetScraper):
|
||||
|
||||
def main() -> None:
|
||||
parser = argparse.ArgumentParser(
|
||||
allow_abbrev=False,
|
||||
description="Scrape RetroPie package targets from scriptmodules"
|
||||
)
|
||||
parser.add_argument("--dry-run", action="store_true", help="Show target summary")
|
||||
|
||||
@@ -174,7 +174,7 @@ class Scraper(BaseTargetScraper):
|
||||
|
||||
|
||||
def main() -> None:
|
||||
parser = argparse.ArgumentParser(description="Scrape ROCKNIX per-device cores")
|
||||
parser = argparse.ArgumentParser(allow_abbrev=False, description="Scrape ROCKNIX per-device cores")
|
||||
parser.add_argument("--dry-run", action="store_true", help="Show target summary")
|
||||
parser.add_argument("--output", "-o", help="Output YAML file")
|
||||
args = parser.parse_args()
|
||||
|
||||
Reference in new issue
Block a user