mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-11 12:33:53 -06:00
fix: type the board choices for mypy
This commit is contained in:
1 parent
139c087bd7
commit
f05a9a2889
3 files changed
+6
-6
No files matched your search
+4
-4
@@ -3472,10 +3472,10 @@ def offer_boards(config: dict) -> dict[tuple[str, str], frozenset[str] | None]:
|
||||
choices.append((row, every))
|
||||
for key, spec in (row.get("board_defaults") or {}).items():
|
||||
branch = str(key).replace("=", " ", 1)
|
||||
choices.append((spec, admitted(lambda b, branch=branch: _branch_holds(branch, b))))
|
||||
choices.append((spec, admitted(functools.partial(_branch_holds, branch))))
|
||||
for offer in offers:
|
||||
when = str(offer.get("when") or "")
|
||||
choices.append((offer, admitted(lambda b, when=when: when_admits(when, b))
|
||||
choices.append((offer, admitted(functools.partial(when_admits, when))
|
||||
if when else every))
|
||||
for choice, boards in choices:
|
||||
if choice.get("core") and choice.get("emulator") in LIBRETRO_RUNNERS:
|
||||
@@ -3549,7 +3549,7 @@ def content_folder_tags(config: dict) -> set[str]:
|
||||
tags |= {
|
||||
CONTENT_FOLDER_PREFIX + json.dumps([
|
||||
c, f, place(f),
|
||||
None if target or boards.get((c, f)) is None else sorted(boards[(c, f)]),
|
||||
None if target or (offered_on := boards.get((c, f))) is None else sorted(offered_on),
|
||||
])
|
||||
for c, f in pairs if f in folders
|
||||
}
|
||||
@@ -3754,7 +3754,7 @@ def content_layout(
|
||||
if f.get("unplaced") != OUTSIDE_BIOS_FOLDER:
|
||||
# A set a launcher record placed stays there: EmuDeck's
|
||||
# mame.ini rompath is read when Steam ROM Manager starts MAME
|
||||
# with no -rompath (tools/launchers/mame.sh), and ES-DE's
|
||||
# with no `-rompath` (tools/launchers/mame.sh), and ES-DE's
|
||||
# commands read the folders they pass.
|
||||
out.append(f)
|
||||
held = {(f.get("root") or "", f.get("standalone_path") or "")}
|
||||
|
||||
@@ -3745,7 +3745,7 @@ def bump_commit(
|
||||
expected = dict(document)
|
||||
expected["source_commit"] = report.head
|
||||
new_text = _set_pin(text, document, "source_commit", report.head, "profiled_date")
|
||||
if document.get("pin_follows"):
|
||||
if document.get("pin_follows") and report.head:
|
||||
new_text, expected = _follow_config_reads(new_text, expected, document, report.head)
|
||||
if upstream_moves:
|
||||
expected["upstream_commit"] = report.upstream_head
|
||||
|
||||
@@ -1210,7 +1210,7 @@ class EveryCoreAFolderOffers(unittest.TestCase):
|
||||
|
||||
|
||||
class CloneReadsItsParent(unittest.TestCase):
|
||||
"""ES-DE starts odyssey2 with -rompath on roms/odyssey2 alone, and MAME
|
||||
"""ES-DE starts odyssey2 with `-rompath` on roms/odyssey2 alone, and MAME
|
||||
finds o2bios.rom in the parent's videopac.zip (src/emu/driver.cpp:31-38)."""
|
||||
|
||||
def test_the_parent_set_goes_to_the_clone_folder(self) -> None:
|
||||
|
||||
Reference in new issue
Block a user