Skip to content

build: lint and format the repo's Python with ruff - #655

Open
afrind wants to merge 1 commit into
mainfrom
devops/ruff-python-lint
Open

build: lint and format the repo's Python with ruff#655
afrind wants to merge 1 commit into
mainfrom
devops/ruff-python-lint

Conversation

@afrind

@afrind afrind commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Nothing formats or lints the Python in tools/, scripts/perf/ and docker/ — check-format covers C++ only. ruff.toml configures it, with target-version py39 so pyupgrade holds to the oldest interpreter contributors already have, and an explicit rule list so a ruff upgrade cannot switch on rules nobody chose.

scripts/dev/format.sh now runs ruff beside clang-format and pins its version the same way; uv fetches the pin, and check-format installs uv. Reformats the three existing scripts and fixes what the lint found: two unused locals, three percent-format strings and an unsorted import block.


This change is Reviewable

Nothing formats or lints the Python in tools/, scripts/perf/ and docker/ —
check-format covers C++ only. ruff.toml configures it, with target-version py39
so pyupgrade holds to the oldest interpreter contributors already have, and an
explicit rule list so a ruff upgrade cannot switch on rules nobody chose.

scripts/dev/format.sh now runs ruff beside clang-format and pins its version
the same way; uv fetches the pin, and check-format installs uv. Reformats the
three existing scripts and fixes what the lint found: two unused locals, three
percent-format strings and an unsorted import block.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@afrind
afrind requested a review from michalhosna August 28, 2026 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant