generate.py: run ruff format on generated files

Running generate.py standalone previously rewrote _ciphers.py with
formatting that differed from the committed (ruff-formatted) style,
creating spurious diffs. release.py already ran ruff after generation;
now generate.py does too, so both entry points leave the tree in the
same state.
This commit is contained in:
LeoVasanko committed 2026-10-04 05:41:14 +00:00
1 parent e01d84a560
commit 199dfe7bd9
2 files changed
+12

No files matched your search

+1
View File
@@ -54,6 +54,7 @@ _FLAG_TRUNCATE = 0x02
_MERKLE_HASH_MIN = 8 _MERKLE_HASH_MIN = 8
_MERKLE_HASH_MAX = 64 _MERKLE_HASH_MAX = 64
@runtime_checkable @runtime_checkable
class Storage(Protocol): class Storage(Protocol):
"""Backing storage for RAF files. Operations must complete fully or raise OSError.""" """Backing storage for RAF files. Operations must complete fully or raise OSError."""
+11
View File
@@ -3,6 +3,7 @@
import pathlib import pathlib
import re import re
import subprocess
import sys import sys
from typing import Dict, Tuple from typing import Dict, Tuple
@@ -375,6 +376,16 @@ def main() -> int:
print(f"Error generating Python modules: {e}", file=sys.stderr) print(f"Error generating Python modules: {e}", file=sys.stderr)
return 1 return 1
print("Step 5: Formatting generated files with ruff...", file=sys.stderr)
result = subprocess.run(
["uv", "run", "ruff", "format", str(pyaegis_dir)],
capture_output=True,
text=True,
)
if result.returncode != 0:
print(f"Error formatting generated files: {result.stderr}", file=sys.stderr)
return 1
return 0 return 0