-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathruff.toml
24 lines (19 loc) · 942 Bytes
/
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
[format]
docstring-code-format = true
[lint]
# See https://docs.astral.sh/ruff/rules for full details of each ruleset.
# Enable: D: `pydocstyle`, PL: `pylint`, I: `isort`, W: `pycodestyle whitespace`
# NPY: `numpy`, FLY: `flynt`, RUF: `ruff`
# From flake8: "ARG", "SLF", "S", "BLE", "B", "A", "C4", "EM", "ICN",
# "PIE", "Q", "RSE", "SIM", "TID"
select = ["D", "PL", "I", "E", "W", "NPY", "FLY", "RUF",
"ARG", "SLF", "S", "BLE","B", "A", "C4", "EM", "ICN", "PIE", "Q", "RSE",
"SIM", "TID"]
# Enable D417 (Missing argument description) on top of the NumPy convention.
extend-select = ["D417"]
# Ignore SIM108 (use ternary instead of if-else) as it can arguably obscure intent.
# Ignore RUF002 (ambiguous characters) as it does not allow apostrophes in strings.
ignore = ["SIM108", "RUF002"]
[lint.pydocstyle]
# Use NumPy convention for checking docstrings
convention = "numpy"