Skip to content

Commit 911e522

Browse files
committed
Add a config file for ruff formatting
1 parent dee7177 commit 911e522

1 file changed

Lines changed: 43 additions & 0 deletions

File tree

‎ruff.toml‎

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# [ruff]
2+
line-length = 120
3+
format.quote-style = "single"
4+
5+
# Enable Pyflakes `E` and `F` codes by default.
6+
lint.select = ["E", "F", "I"]
7+
lint.ignore = []
8+
9+
# Exclude a variety of commonly ignored directories.
10+
exclude = [
11+
".bzr",
12+
".direnv",
13+
".eggs",
14+
".git",
15+
".hg",
16+
".mypy_cache",
17+
".nox",
18+
".pants.d",
19+
".ruff_cache",
20+
".svn",
21+
".tox",
22+
"__pypackages__",
23+
"_build",
24+
"buck-out",
25+
"build",
26+
"dist",
27+
"node_modules",
28+
".env",
29+
".venv",
30+
"venv",
31+
"typings/**/*.pyi",
32+
]
33+
lint.per-file-ignores = { }
34+
35+
# Allow unused variables when underscore-prefixed.
36+
# dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
37+
38+
# Assume Python 3.13.
39+
target-version = "py313"
40+
41+
#[tool.ruff.mccabe]
42+
## Unlike Flake8, default to a complexity level of 10.
43+
lint.mccabe.max-complexity = 10

0 commit comments

Comments
 (0)