Skip to content

Commit 75ab531

Browse files
committed
build: configure ruff
1 parent c5b7ae6 commit 75ab531

1 file changed

Lines changed: 67 additions & 0 deletions

File tree

ruff.toml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
exclude = [
2+
".bzr",
3+
".direnv",
4+
".eggs",
5+
".git",
6+
".git-rewrite",
7+
".hg",
8+
".ipynb_checkpoints",
9+
".mypy_cache",
10+
".nox",
11+
".pants.d",
12+
".pyenv",
13+
".pytest_cache",
14+
".pytype",
15+
".ruff_cache",
16+
".svn",
17+
".tox",
18+
".venv",
19+
".vscode",
20+
"__pypackages__",
21+
"_build",
22+
"buck-out",
23+
"build",
24+
"dist",
25+
"node_modules",
26+
"site-packages",
27+
"venv",
28+
]
29+
30+
line-length = 88
31+
indent-width = 4
32+
33+
target-version = "py39"
34+
35+
[lint]
36+
select = ["E4", "E7", "E9", "F", "B"]
37+
38+
ignore = ["E501"]
39+
40+
fixable = ["ALL"]
41+
unfixable = ["B"]
42+
43+
# Allow unused variables when underscore-prefixed.
44+
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
45+
46+
[format]
47+
quote-style = "double"
48+
49+
indent-style = "space"
50+
51+
skip-magic-trailing-comma = false
52+
53+
line-ending = "auto"
54+
55+
# Enable auto-formatting of code examples in docstrings. Markdown,
56+
# reStructuredText code/literal blocks and doctests are all supported.
57+
#
58+
# This is currently disabled by default, but it is planned for this
59+
# to be opt-out in the future.
60+
docstring-code-format = true
61+
62+
# Set the line length limit used when formatting code snippets in
63+
# docstrings.
64+
#
65+
# This only has an effect when the `docstring-code-format` setting is
66+
# enabled.
67+
docstring-code-line-length = "dynamic"

0 commit comments

Comments
 (0)