-
Notifications
You must be signed in to change notification settings - Fork 2
/
.ruff.toml
67 lines (55 loc) · 1.77 KB
/
.ruff.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
select = ["F","W","E","C90","I","N","D","UP","YTT","ANN","ASYNC","BLE","B","A","COM","CPY","C4","DTZ","T10","DJ","EM","EXE","FA","ISC","ICN","G","INP","PIE","PYI","PT","Q","RSE","RET","SLF","SLOT","SIM","TID","TCH","INT","ARG","PTH","TD","FIX","ERA","PD","PGH","PL","TRY","FLY","NPY","AIR","PERF","FURB","LOG","RUF"]
ignore = ["ANN101", "ANN102", "E203", "S", "FBT", "T20"]
# Allow autofix for all enabled rules (when `--fix`) is provided.
#fixable = ["ALL"]
#unfixable = []
include = ["black_it/**/*.py", "tests/**/*.py", "scripts/**/*.py", "examples/**/*.py"]
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".mypy_cache",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
"scripts/whitelists/*"
]
# Same as Black.
line-length = 120
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
# Whether to enable preview mode. When preview mode is enabled, Ruff will use unstable rules and fixes.
preview = true
# Assume Python 3.9
target-version = "py39"
[per-file-ignores]
"examples/docker-sir.py" = ["INP001", "T201"]
"examples/main.py" = ["INP001", "T201"]
"examples/models/simple_models.py" = ["ERA001", "INP001"]
"examples/models/economics/brock_hommes.py" = ["ERA001"]
"examples/models/forest_fire/forest_fire.py" = ["T201"]
"examples/models/sir/simlib.py" = ["T201"]
"scripts/check_copyright.py" = ["T201"]
"tests/**.py" = ["PLR2004"]
[mccabe]
# Unlike Flake8, default to a complexity level of 10.
max-complexity = 10
[pydocstyle]
convention = "google"
[pylint]
max-args = 7