-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathruff.toml
More file actions
96 lines (86 loc) · 2.06 KB
/
ruff.toml
File metadata and controls
96 lines (86 loc) · 2.06 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
94
95
96
# https://docs.astral.sh/ruff/
# 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",
".idea",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
]
line-length = 100
indent-width = 4
target-version = "py310"
[lint]
select = [
# Enable flake8-comprehensions rules
"C",
# Enable flake8-bugbear rules
"B",
# Enable pydocstyle rules
"D",
# Enable pycodestyle errors/warning rules
"E", "W",
# Enable pyflakes rules
"F",
# Enable isort rules
"I",
# Enable pandas-vet rules
"PD",
# Enable perflint rules
"PERF",
# Enable pylint rules
"PL",
# Enable ruff-specific rules
"RUF",
# Enable pyupgrade rules
"UP",
]
ignore = [
# Do not mandate docstrings
"D100", "D101", "D102", "D103", "D104", "D105", "D106", "D107", "D212", "D213", "D407", "D410", "D413",
# Disable some rules that are mutually exclusive with others
"D203",
# Don't turn "x == True" into "x is True", since x might be a pandas.Series
"E712",
# Allow f-strings without any placeholders (this can be considered a stylistic choice)
"F541",
# No max line length checking
"E501",
# Do not warn about magic values
"PLR2004",
# Ignore
"PLC0105",
# Do not warn about too many arguments
"PLR0913",
]
# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[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"]
[lint.pydocstyle]
convention = "google"
[format]
docstring-code-format = true
docstring-code-line-length = "dynamic"