|
1 |
| -[tool.black] |
2 |
| -line-length = 120 |
3 |
| -# By default, `black` will ignore skip configuration when paths are explicitly provided. |
4 |
| -# In order for `pre-commit` to respect this configuration, `force-exclude` needs to be explicitly set. |
5 |
| -force-exclude = 'migrations' |
6 |
| - |
7 |
| -[tool.isort] |
8 |
| -# https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html#isort |
9 |
| -profile = "black" |
10 |
| -# By default, `isort` will ignore skip configuration when paths are explicitly provided. |
11 |
| -# In order for `pre-commit` to respect this configuration, `filter_files` needs to be set to true. |
12 |
| -# https://jugmac00.github.io/blog/isort-and-pre-commit-a-friendship-with-obstacles/ |
13 |
| -filter_files = true |
14 |
| -skip_glob = ["*/migrations/*", "config/*"] |
| 1 | +[tool.ruff] |
| 2 | +# Exclude a variety of commonly ignored directories. |
| 3 | +exclude = [ |
| 4 | + ".bzr", |
| 5 | + ".direnv", |
| 6 | + ".eggs", |
| 7 | + ".git", |
| 8 | + ".git-rewrite", |
| 9 | + ".hg", |
| 10 | + ".ipynb_checkpoints", |
| 11 | + ".mypy_cache", |
| 12 | + ".nox", |
| 13 | + ".pants.d", |
| 14 | + ".pyenv", |
| 15 | + ".pytest_cache", |
| 16 | + ".pytype", |
| 17 | + ".ruff_cache", |
| 18 | + ".svn", |
| 19 | + ".tox", |
| 20 | + ".venv", |
| 21 | + ".vscode", |
| 22 | + "__pypackages__", |
| 23 | + "_build", |
| 24 | + "buck-out", |
| 25 | + "build", |
| 26 | + "dist", |
| 27 | + "node_modules", |
| 28 | + "site-packages", |
| 29 | + "venv", |
| 30 | +] |
| 31 | + |
| 32 | +# Same as Black. |
| 33 | +line-length = 88 |
| 34 | +indent-width = 4 |
| 35 | + |
| 36 | +# Assume Python 3.8 |
| 37 | +target-version = "py38" |
| 38 | + |
| 39 | +[tool.ruff.lint] |
| 40 | +# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default. |
| 41 | +select = ["E4", "E7", "E9", "F", "I"] |
| 42 | +ignore = ["E722"] |
| 43 | + |
| 44 | +# Allow fix for all enabled rules (when `--fix`) is provided. |
| 45 | +fixable = ["ALL"] |
| 46 | +unfixable = [] |
| 47 | + |
| 48 | +# Allow unused variables when underscore-prefixed. |
| 49 | +dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$" |
| 50 | + |
| 51 | +[tool.ruff.format] |
| 52 | +# Like Black, use double quotes for strings. |
| 53 | +quote-style = "double" |
| 54 | + |
| 55 | +# Like Black, indent with spaces, rather than tabs. |
| 56 | +indent-style = "space" |
| 57 | + |
| 58 | +# Like Black, respect magic trailing commas. |
| 59 | +skip-magic-trailing-comma = false |
| 60 | + |
| 61 | +# Like Black, automatically detect the appropriate line ending. |
| 62 | +line-ending = "auto" |
| 63 | + |
| 64 | +[tool.ruff.lint.isort] |
| 65 | +case-sensitive = true |
0 commit comments