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

Lint Python code with ruff instead of flake8 and isort #1295

Merged
merged 1 commit into from
Sep 5, 2023

Conversation

cclauss
Copy link
Contributor

@cclauss cclauss commented Sep 5, 2023

Ruff supports over 600 lint rules and can be used to replace Flake8 (plus dozens of plugins), isort, pydocstyle, yesqa, eradicate, pyupgrade, and autoflake, all while executing (in Rust) tens or hundreds of times faster than any individual tool.

@jschneier
Copy link
Owner

How is the Interop with black? Taking that hit is on my list of things to do as well (double quotes and all)

@cclauss
Copy link
Contributor Author

cclauss commented Sep 5, 2023

https://beta.ruff.rs/docs/faq/ is the general answer.

https://beta.ruff.rs/docs/rules/#flake8-quotes-q is the ruff rules Q answer. An option is ruff --select=Q --fix .

https://black.readthedocs.io/en/stable/the_black_code_style/current_style.html#strings is the black answer with the optional --skip-string-normalization

@cclauss
Copy link
Contributor Author

cclauss commented Sep 5, 2023

Please rerun the failing test. The result looks flakey to me.

@jschneier jschneier merged commit b562b0c into jschneier:master Sep 5, 2023
15 checks passed
@jschneier
Copy link
Owner

Thanks.

@cclauss cclauss deleted the ruff branch September 6, 2023 00:34
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