docs: write prose without dashes or semicolons

Profiles, the wiki, comments, docstrings, command output and schema descriptions carried em-dashes, clause-joining semicolons, unicode arrows, box-drawing banners and check-mark glyphs. Each sentence was rewritten rather than having its character swapped. Hashes, paths, source_ref values and every cited file:line are unchanged, which a comparison of each parsed profile against the previous revision confirms.

validate_pr comments now say PASS and FAIL in words, and source_ref values in a profile's structured blocks render as code. test_prose_style fails if any of these comes back, in tracked files or in the generated site.
This commit is contained in:
Abdessamad Derraz committed 2026-10-19 06:47:31 +02:00
1 parent 583031eda5
commit 4231902a6c
495 files changed
+2486 -2301

No files matched your search

@@ -45,7 +45,7 @@ class ShellSubsetError(RuntimeError):
def _condition(text: str, env: dict[str, str]) -> bool | None:
"""`[ "${A}" = "x" -o "${B}" != "y" ]`, `-n`, `-z`; None when a clause
"""`[ "${A}" = "x" -o "${B}" != "y" ]`, `-n`, `-z`. None when a clause
tests a variable nothing has set and no other clause is true."""
results: list[bool | None] = []
for clause in re.split(r"\s+-o\s+", text):
@@ -72,12 +72,12 @@ def _condition(text: str, env: dict[str, str]) -> bool | None:
# The variables this scraper reads. Set inside a case statement, which the
# evaluator does not follow, they stop the scrape; anything else is skipped.
# evaluator does not follow, they stop the scrape. Anything else is skipped.
WATCHED = frozenset({"OPENGLES", "LIBRETRO_CORES", "EXCLUDE_LIBRETRO_CORES"})
def _expand(value: str, env: dict[str, str]) -> str:
"""${NAME} and $NAME from what is set so far; unset expands to nothing."""
"""${NAME} and $NAME from what is set so far. Unset expands to nothing."""
return re.sub(
r"\$\{(\w+)\}|\$(\w+)",
lambda m: env.get(m.group(1) or m.group(2), ""),
@@ -182,7 +182,7 @@ def device_cores(cores_mk: str, env: dict[str, str]) -> list[str]:
def device_arch(project: str, options: str) -> str:
"""The architecture Lakka builds a device for: aarch64 where its options
list it, else arm; the Generic images are x86_64."""
list it, else arm. The Generic images are x86_64."""
if project == "Generic":
return "x86_64"
return "aarch64" if re.search(r"^\s*aarch64\)", options, re.MULTILINE) else "arm"
@@ -148,7 +148,7 @@ class Scraper(BaseTargetScraper):
print(f" warning: no rp_module_id in {filename}", file=sys.stderr)
continue
# A libretro package is lr-<core> with the buildbot name hyphenated
# (lr-beetle-psx -> beetle_psx); a standalone package keeps the id
# (lr-beetle-psx -> beetle_psx), and a standalone package keeps the id
# the platform list carries (dosbox-staging).
core_name = module_id
if core_name.startswith("lr-"):
@@ -91,7 +91,7 @@ def core_names(libretro: list[str], standalone: list[str]) -> list[str]:
"""Package names as the profiles' cores: lists spell them.
A libretro package is the core's name with `-lr` (`beetle-psx-lr`,
`neocd_lr`), spelled with underscores as the buildbot names it; a
`neocd_lr`), spelled with underscores as the buildbot names it, and a
standalone package drops its `-sa` (`duckstation-sa`, `hatarisa`).
"""
names = {re.sub(r"[-_]lr$", "", package).replace("-", "_") for package in libretro}
@@ -101,7 +101,7 @@ def core_names(libretro: list[str], standalone: list[str]) -> list[str]:
# A package that builds nothing itself and pulls other cores in. idtech-lr
# installs ecwolf, prboom, tyrquake and vitaquake2 (vitaquake3 and boom3 on
# x86_64); no profile could name it.
# x86_64). No profile could name it.
METAPACKAGES = {"idtech-lr": "projects/ROCKNIX/packages/emulators/libretro/idtech-lr/package.mk"}
_IF_RE = re.compile(r'^if \[ "\$\{(\w+)\}" = "?([\w-]+)"? \]; then\n(.*?)^fi$',
re.MULTILINE | re.DOTALL)
@@ -111,7 +111,7 @@ def metapackage_cores(package_mk: str, arch: str) -> list[str]:
"""The -lr packages a metapackage depends on for one architecture.
OPENGLES_SUPPORT is yes on every ROCKNIX device (config/graphic, from
OPENGLES="mesa" in projects/ROCKNIX/options); TARGET_ARCH is the device's.
OPENGLES="mesa" in projects/ROCKNIX/options), and TARGET_ARCH is the device's.
"""
found: list[str] = []
for variable, value, body in _IF_RE.findall(package_mk):