mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-12-02 14:28:54 -06:00
scraper/ held the platform scrapers next to three other subjects. The launcher readers move to scraper/launchers/ (their _launchers suffix dropped), the MAME and FBNeo hash scrapers and romset importers to scraper/arcade/, the DAT readers and dump catalog importers to scraper/dats/. The buildbot check is a freshness check and moves to freshness/buildbot.py. Every -m command, workflow job, schema description and page follows. The scraper discovery in scraper/__init__.py had no caller: the registry's scraper: field names the module, and the pages now say so.
27 lines
804 B
Python
27 lines
804 B
Python
"""Source texts the launcher test modules build: blocks placed at their lines, C# files by path."""
|
|
|
|
from __future__ import annotations
|
|
|
|
import tests
|
|
|
|
import textwrap
|
|
|
|
from scraper.launchers.csharp_source import Source
|
|
|
|
|
|
def placed(blocks: dict[int, str]) -> str:
|
|
"""Each block starting at its line, blank lines between."""
|
|
lines: list[str] = []
|
|
for start, block in sorted(blocks.items()):
|
|
if len(lines) >= start:
|
|
raise AssertionError(f"block at line {start} overlaps the previous one")
|
|
lines += [""] * (start - 1 - len(lines))
|
|
lines += block.splitlines()
|
|
return "\n".join(lines) + "\n"
|
|
|
|
|
|
def _sources(**texts: str) -> dict[str, Source]:
|
|
return {
|
|
path: Source(path, textwrap.dedent(text).lstrip("\n")) for path, text in texts.items()
|
|
}
|