Last active
March 12, 2023 19:55
-
-
Save oliverandrich/a7219b1c9a09d557df17e50f183f1c26 to your computer and use it in GitHub Desktop.
My current ruff configuration in Django projects. https://beta.ruff.rs/docs/
This file contains 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
[tool.ruff] | |
select = ["A", "B", "C4", "E", "F", "I", "DJ", "INP", "TID", "UP", "YTT"] | |
ignore = [] | |
# Allow autofix for all enabled rules (when `--fix`) is provided. | |
fixable = ["A", "B", "C4", "E", "F", "I", "TID", "UP"] | |
unfixable = [] | |
# Exclude a variety of commonly ignored directories. | |
exclude = [ | |
".bzr", | |
".direnv", | |
".eggs", | |
".git", | |
".github", | |
".hg", | |
".ruff_cache", | |
".svn", | |
".tox", | |
".venv", | |
"__pypackages__", | |
"_build", | |
"build", | |
"dist", | |
"migrations", | |
"node_modules", | |
"static", | |
] | |
# Same as Black. | |
line-length = 100 | |
# Allow unused variables when underscore-prefixed. | |
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$" | |
# Assume Python 3.10. | |
target-version = "py311" | |
[tool.ruff.mccabe] | |
# Unlike Flake8, default to a complexity level of 10. | |
max-complexity = 10 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment