mirror of
https://github.com/openai/codex.git
synced 2026-10-19 17:28:46 +00:00
Format Python scripts across the repository (#42109)
## Why The root Python formatting pass only covered `scripts/`, leaving Python utilities elsewhere in the repository outside `just fmt` and `just fmt-check`. ## What changed - Run the scripts Ruff formatter from the repository root. - Exclude `sdk/python`, which has its own formatter pass, and `codex-rs/vendor`. - Apply Ruff formatting to the newly covered Python files and update the formatter coverage test. GitOrigin-RevId: 73ac82b8bb9c713d589724f6c4f926399febb513
This commit is contained in:
+2
-12
@@ -116,20 +116,10 @@ def python_sdk_formatter_group(*, check: bool) -> FormatterGroup:
|
||||
|
||||
|
||||
def python_scripts_formatter_group(*, check: bool) -> FormatterGroup:
|
||||
# The SDK and internal scripts intentionally use separate project roots so
|
||||
# uv and Ruff retain each project's configuration context.
|
||||
args = [
|
||||
"uv",
|
||||
"run",
|
||||
"--frozen",
|
||||
"--project",
|
||||
"scripts",
|
||||
"ruff",
|
||||
"format",
|
||||
]
|
||||
args = ["uv", "run", "--frozen", "--project", "scripts", "ruff", "format"]
|
||||
if check:
|
||||
args.append("--check")
|
||||
args.append("scripts")
|
||||
args.append(".")
|
||||
return FormatterGroup("Python scripts", (Command(tuple(args)),))
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user