Skip to content

Commit 814b661

Browse files
authored
Create ruff.toml
1 parent d7a3eb0 commit 814b661

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed

ruff.toml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Exclude a variety of commonly ignored directories.
2+
exclude = [
3+
".bzr",
4+
".direnv",
5+
".eggs",
6+
".git",
7+
".git-rewrite",
8+
".hg",
9+
".ipynb_checkpoints",
10+
".mypy_cache",
11+
".nox",
12+
".pants.d",
13+
".pyenv",
14+
".pytest_cache",
15+
".pytype",
16+
".ruff_cache",
17+
".svn",
18+
".tox",
19+
".venv",
20+
".vscode",
21+
"__pypackages__",
22+
"_build",
23+
"buck-out",
24+
"build",
25+
"dist",
26+
"node_modules",
27+
"site-packages",
28+
"venv",
29+
]
30+
31+
# Same as Black.
32+
line-length = 120
33+
indent-width = 4
34+
35+
# Assume Python 3.9
36+
target-version = "py39"
37+
38+
[lint]
39+
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
40+
select = ["E", "F", "I", "PERF", "PL", "RUF", "S", "SIM", "UP", "W"]
41+
ignore = []
42+
43+
# Allow fix for all enabled rules (when `--fix`) is provided.
44+
fixable = ["ALL"]
45+
unfixable = []
46+
47+
# Allow unused variables when underscore-prefixed.
48+
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
49+
50+
[format]
51+
# Like Black, use double quotes for strings.
52+
quote-style = "double"
53+
54+
# Like Black, indent with spaces, rather than tabs.
55+
indent-style = "space"
56+
57+
# Like Black, respect magic trailing commas.
58+
skip-magic-trailing-comma = false
59+
60+
# Like Black, automatically detect the appropriate line ending.
61+
line-ending = "auto"

0 commit comments

Comments
 (0)