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:
1 parent
e01d84a560
commit
199dfe7bd9
2 files changed
+12
No files matched your search
@@ -3,6 +3,7 @@
|
||||
|
||||
import pathlib
|
||||
import re
|
||||
import subprocess
|
||||
import sys
|
||||
from typing import Dict, Tuple
|
||||
|
||||
@@ -375,6 +376,16 @@ def main() -> int:
|
||||
print(f"Error generating Python modules: {e}", file=sys.stderr)
|
||||
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
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user