Skip to content

Switch from black and isort to ruff#364

Open
henrik-nil-acc wants to merge 4 commits into
jborean93:masterfrom
henrik-nil-acc:pr/ruff-switch
Open

Switch from black and isort to ruff#364
henrik-nil-acc wants to merge 4 commits into
jborean93:masterfrom
henrik-nil-acc:pr/ruff-switch

Conversation

@henrik-nil-acc

Copy link
Copy Markdown
Contributor

black and isort are two tools, two configs, and two pinned
versions to keep in step for what ruff does in one.

Applying ruff-format while black and isort still run keeps the
formatting churn out of the tooling change.

ruff-format joins adjacent byte-string literals that black kept
on separate lines, which would collapse the readable
protocol-field byte groupings. A # fmt: skip on each such site
preserves the layout.
Consolidates linting and formatting under one tool.
Flags the whitespace and statement style issues that formatting
leaves unchecked.
Catches unused imports, unused variables, and other reference
bugs.

The __init__.py re-exports and the deprecated query_info shim
are exempted per-file because their imports are deliberate API
surface, not dead code.
@codecov

codecov Bot commented Jun 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.73%. Comparing base (f18e252) to head (7266d9f).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #364      +/-   ##
==========================================
- Coverage   98.73%   98.73%   -0.01%     
==========================================
  Files          24       24              
  Lines        5309     5307       -2     
==========================================
- Hits         5242     5240       -2     
  Misses         67       67              
Flag Coverage Δ
macOS 69.56% <87.50%> (-0.04%) ⬇️
py3.10 98.73% <100.00%> (-0.01%) ⬇️
py3.11 98.73% <100.00%> (-0.01%) ⬇️
py3.12 98.73% <100.00%> (-0.01%) ⬇️
py3.13 98.73% <100.00%> (-0.01%) ⬇️
py3.14 98.73% <100.00%> (-0.01%) ⬇️
ubuntu 96.66% <100.00%> (-0.01%) ⬇️
windows 98.66% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@henrik-nil-acc

Copy link
Copy Markdown
Contributor Author

Maybe make a release before this is merged?

@jborean93

Copy link
Copy Markdown
Owner

I've pushed out v1.17.0 just now, thank you very much for all your changes and bugfixes so far. I appreciate that this consolidates everything into 1 tool but for now I prefer to keep things as they are. Most of my other projects use black and isort and I've had enough time to get a handle on how I can use ruff instead and what rules should or should not be enabled.

Maybe I'll revisit this in the future but for now wish to keep this as it is today.

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.

2 participants