mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
Use dependency groups for Python SDK tooling (#27538)
## Summary `just fmt` previously used `uv run --with ruff` to make Ruff available. Because `--with` creates an ephemeral overlay outside the project lockfile, uv periodically re-resolved Ruff (by default every 10 minutes) instead of using the version recorded in `uv.lock`. Move the Python SDK tooling dependencies from the published `dev` extra into `format`, `test`, and composed `dev` dependency groups. The formatter now selects only the locked `format` group, contributor and CI setup explicitly sync the `dev` group, and CI and release commands reuse that environment with `--frozen --no-sync`. The scripts formatter also uses its project's locked Ruff dependency instead of an ephemeral overlay. Validated the Python 3.12 SDK suite (119 passed, 38 skipped) and the repository formatter.
This commit is contained in:
committed by
GitHub
Unverified
parent
3cac2e0d3f
commit
c375deaf66
+3
-8
@@ -37,17 +37,15 @@ class FormatterResult:
|
||||
def formatter_groups(*, check: bool) -> tuple[FormatterGroup, ...]:
|
||||
just_args = ["just", "--unstable", "--fmt"]
|
||||
cargo_args = ["cargo", "fmt", "--", "--config", "imports_granularity=Item"]
|
||||
# Use an unpinned overlay so Ruff is available without syncing project
|
||||
# dependencies. Each `--project` still retains its local configuration context.
|
||||
# Each `--project` retains its local dependency and Ruff configuration context.
|
||||
sdk_uv_run_args = [
|
||||
"uv",
|
||||
"run",
|
||||
"--frozen",
|
||||
"--project",
|
||||
"sdk/python",
|
||||
"--no-sync",
|
||||
"--with",
|
||||
"ruff",
|
||||
"--only-group",
|
||||
"format",
|
||||
]
|
||||
scripts_uv_run_args = [
|
||||
"uv",
|
||||
@@ -55,9 +53,6 @@ def formatter_groups(*, check: bool) -> tuple[FormatterGroup, ...]:
|
||||
"--frozen",
|
||||
"--project",
|
||||
"scripts",
|
||||
"--no-sync",
|
||||
"--with",
|
||||
"ruff",
|
||||
]
|
||||
sdk_format_args = [
|
||||
*sdk_uv_run_args,
|
||||
|
||||
Reference in New Issue
Block a user