chore(lint): adopt ruff + pre-commit, gate CI on lint job#83
Open
tomz wants to merge 1 commit into
Open
Conversation
Add a conservative ruff config (E/F/I/W), a pre-commit hook set, and a CI lint job (lint + format both enforcing). Reformat the existing tree with `ruff format` and replace ad-hoc print() diagnostics with module-level loggers across datagen and timing helpers. Fix obvious nits surfaced by ruff (import order, bare except -> except Exception, dead assignment). Drop Python 3.8 support and move pyarrow to base dependencies (the core results/timing modules import it unconditionally). Gitignore scratch/ for workspace-specific scratchpads. W291/W293 stay globally ignored because trailing whitespace inside multi-line SQL string literals is intentional and not touched by `ruff format`.
Author
This was referenced May 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adopts ruff as the single linter + formatter and wires it into pre-commit and CI.
ruffconfig topyproject.toml(lint + format)..pre-commit-config.yaml.ruff formatacross the repo (the bulk of the diff — pure formatting, no behavioral change).|| trueescape hatch).Why
One tool for lint + format, a fast local guard via pre-commit, and a CI gate so formatting drift can't land again.
Notes for reviewers
pyproject.toml/.pre-commit-config.yaml/ CI workflow changes and skim the rest.W291/W293(trailing whitespace) are intentionally ignored: they occur inside triple-quoted SQL string literals where the whitespace is part of the query text, andruff formatcorrectly leaves those untouched. Rationale is documented inline inpyproject.toml.Tests
ruff check+ruff format --checkclean; suite green (24 passed).