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

fix: switch to ruff-format #696

Merged
merged 4 commits into from
Oct 30, 2023
Merged

Conversation

henryiii
Copy link
Contributor

This is 30x faster than black, drops a dependency, and supports single quotes as a setting.

See https://astral.sh/blog/the-ruff-formatter & scientific-python/cookie#299.

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
@henryiii
Copy link
Contributor Author

pre-commit.ci autofix

@henryiii
Copy link
Contributor Author

henryiii commented Oct 26, 2023

We have a mix of single and double triple quoted strings in the codebase. This just normalizes on double quoted triple quote strings, following PEP 257's docstring recommendation and following PEP 8's recommendation that all triple quoted strings be made with double quotes (to match PEP 257's docstrings). Before these weren't normalized and could go either way.

@layday
Copy link
Member

layday commented Oct 27, 2023

You can also remove black's config from pyproject.toml.

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
@henryiii
Copy link
Contributor Author

Ahh, thanks! I could have sworn I did that, but I think I just started to and didn't finish.

@henryiii
Copy link
Contributor Author

pre-commit.ci autofix

@gaborbernat gaborbernat merged commit 9c5617a into pypa:main Oct 30, 2023
63 checks passed
@henryiii henryiii deleted the henryiii/chore/ruffmt branch October 30, 2023 21:21
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.

3 participants