-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathruff.toml
More file actions
93 lines (91 loc) · 1.98 KB
/
ruff.toml
File metadata and controls
93 lines (91 loc) · 1.98 KB
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
lint.select = [
# Enable flake8-comprehensions rules
"C",
# Enable pydocstyle rules
"D",
# Enable pycodestyle errors/warning rules
"E","W",
# Enable pyflakes rules
"F",
# Enable pandas-vet rules
"PD",
# Enable perflint rules
"PERF",
# Enable pylint rules
"PL",
# Enable ruff-specific rules
"RUF",
# Enable pyupgrade rules
"UP",
# Enable isort rules
"I",
]
lint.ignore = [
# Do not mandate docstrings
"D100", "D101", "D102", "D103", "D104", "D105", "D106", "D107", "D400", "D415",
# Disable some rules that are mutually exclusive with others
"D203", "D212",
# Do not apply rules about docstring wording or formatting
"D205", "D401", "D404",
"E501",
"C901",
"PLR0911",
"PLR0912",
"PLR0913",
"PLR0915",
"PLW2901",
"RUF015",
"UP007", # This doesn't work in older Python versions
"PD901",
"PERF203",
"PERF401",
"PLR2004",
"E402",
"RUF001",
"W291",
"W293",
"RUF003",
"F821",
"C403",
"PLE2502",
"D417",
"C414",
"PLC0206", # fix me
]
# Allow fix for all enabled rules (when `--fix`) is provided.
lint.fixable = ["ALL"]
lint.unfixable = []
#unsafe-fixes = true
# 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",
"venv",
]
# Allow unused variables when underscore-prefixed.
lint.dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
target-version = "py311"
output-format = "full"
line-length = 160
[lint.per-file-ignores]
# Allow unused imports in __init__.py files
# These are run when the containing package is imported and so it's ok for them to be unused in the package itself
"__init__.py" = ["F401"]
"tests/*" = ["PLR2004"]