Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: use ruff for formatting #328

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mistydemeo
Copy link
Contributor

Had a discussion about this with Alex; we thought it might be a good idea to try out ruff for formatting rather than black. Seems to be working well so far in local testing.

There are a few minor changes here compared to black; it flagged unnecessary string concatenations that black didn't care about, and has slightly different opinions on line length.

There are a few minor changes here compared to black; it flagged
unnecessary string concatenations, and has slightly different
opinions on line length.
@galgeek galgeek self-requested a review February 25, 2025 22:49
@@ -1,7 +1,7 @@
.PHONY: format
format:
venv/bin/black -t py35 -t py36 -t py37 -t py38 -t py39 -t py310 -t py311 -t py312 .
venv/bin/ruff format --target-version py37 .
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Python 3.7 is the earliest version we can target, per
https://docs.astral.sh/ruff/settings/#target-version

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should have mentioned, by the way, that unlike black it doesn't want you to specify every version you support - just the lowest.

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