style(scripts): format the scripts and their tests with ruff

Output of `ruff format` and nothing else, in its own commit so the diff is
reviewable (#112). The ruff-check hook is skipped for this commit only: its
findings are fixed in the next one.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014uGZTNmHMc85bomfevwUDG
This commit is contained in:
Defame1297andClaude Sonnet 5.5 committed 2026-11-14 13:25:58 +00:00
1 parent 557f573df2
commit db1c1e176f
12 files changed
+1520 -427

No files matched your search

+12 -3
View File
@@ -7,6 +7,7 @@ EUPL-1.2) before the roles that use them exist; reuse >= 6 reports those as
non-compliant. Every other finding still fails. Once the extraction waves have brought
in files for all of them, delete UNUSED_ALLOWED and call `reuse lint` directly.
"""
import json
import subprocess
import sys
@@ -15,7 +16,9 @@ UNUSED_ALLOWED = {"GPL-3.0-only", "Apache-2.0", "MIT", "EUPL-1.2"}
def main() -> int:
proc = subprocess.run(["reuse", "lint", "--json"], capture_output=True, text=True, check=False)
proc = subprocess.run(
["reuse", "lint", "--json"], capture_output=True, text=True, check=False
)
try:
report = json.loads(proc.stdout)
except json.JSONDecodeError:
@@ -28,9 +31,15 @@ def main() -> int:
if value:
problems[key] = value
if problems:
sys.stderr.write("reuse lint found problems:\n" + json.dumps(problems, indent=2) + "\n")
sys.stderr.write(
"reuse lint found problems:\n" + json.dumps(problems, indent=2) + "\n"
)
return 1
print("reuse lint: compliant (unused licence texts tolerated: " + ", ".join(sorted(UNUSED_ALLOWED)) + ")")
print(
"reuse lint: compliant (unused licence texts tolerated: "
+ ", ".join(sorted(UNUSED_ALLOWED))
+ ")"
)
return 0