Last active
October 27, 2025 03:28
-
-
Save cantis/7d7f8a2097d5fd5772ed344a13909981 to your computer and use it in GitHub Desktop.
ruff.toml default config
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
| #:schema = "https://json.schemastore.org/ruff.json"\ | |
| line-length = 120 | |
| # Bigger than the recomendation in pep 8 but they are focused on having multiple | |
| # windows open side by side, which I rarely do (might matter for PR's?) | |
| [lint] | |
| select = ["E", "F", "I"] | |
| # E = Pycodestyle errors | |
| # F = Pyflakes rules (unused imports, unused-variables etc.) | |
| # I = Import Sorting, missing imports | |
| [format] | |
| quote-style = "single" | |
| # I use singles for regular strings, tripple double are still used for docstrings. |
Author
Author
I've adjusted this now to be minimal, with the understanding that most of the default setup is fine and I just need to put in my custom items. The default line length is too short, and I want 'more' error checks and I prefer single quotes on regular strings. Note that this will leave the double quotes in place for docstrings.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
My Default
ruff.tomlfor my projects.Note:
ruff.tomlis the recommended file name and should be in the project root.