mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
Check root Python script formatting in CI (#25165)
## Why Python files under `scripts/` were not covered by the repository formatting recipe or the CI formatting job, so formatting drift could merge unnoticed. ## What - Add a dedicated `scripts/pyproject.toml` and `scripts/uv.lock` so root-script formatting uses a locked Ruff version. - Extend `just fmt` to format root Python scripts and add `fmt-scripts-check` for CI. - Run `just fmt-scripts-check` from `.github/workflows/ci.yml`, installing `uv` through SHA-pinned `astral-sh/setup-uv` while retaining the `uv` `0.11.3` pin. - Apply Ruff formatting to the root Python scripts, including `scripts/just-shell.py`, and extend `sdk/python/tests/test_artifact_workflow_and_binaries.py` to cover the root formatting recipe. - Update `AGENTS.md` so agents run `just fmt` after code changes anywhere in the repository. ## Validation - Extended the existing Python SDK workflow test to assert that `just fmt` includes root Python scripts.
This commit is contained in:
committed by
GitHub
Unverified
parent
c3cdf3c007
commit
281b416c44
@@ -44,8 +44,7 @@ def build_source_binaries(
|
||||
variant,
|
||||
build_entrypoint=entrypoint_bin is None,
|
||||
build_bwrap=spec.is_linux and bwrap_bin is None,
|
||||
build_codex_command_runner=spec.is_windows
|
||||
and codex_command_runner_bin is None,
|
||||
build_codex_command_runner=spec.is_windows and codex_command_runner_bin is None,
|
||||
build_codex_windows_sandbox_setup=spec.is_windows
|
||||
and codex_windows_sandbox_setup_bin is None,
|
||||
)
|
||||
@@ -138,7 +137,9 @@ def validate_prebuilt_resource_inputs(
|
||||
)
|
||||
|
||||
|
||||
def resolve_output_path(explicit_path: Path | None, default_path: Path | None) -> Path | None:
|
||||
def resolve_output_path(
|
||||
explicit_path: Path | None, default_path: Path | None
|
||||
) -> Path | None:
|
||||
if explicit_path is not None:
|
||||
return explicit_path.resolve()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user