-
Notifications
You must be signed in to change notification settings - Fork 7
/
.ruff.toml
78 lines (68 loc) · 1.76 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
68
69
70
71
72
73
74
75
76
77
78
extend-exclude = ["venv", "docs/conf.py"]
line-length = 99
# Assume Python 3.10.
target-version = "py310"
# Enable using ruff with notebooks
extend-include = ["*.ipynb"]
[lint]
select = [
"E", # pycodestyle
"W", # pycodestyle
# "C", # mccabe
"F", # pyflakes
# "UP", # pyupgrade
# "D", # pydocstyle
"N", # pep8-naming
"YTT", # flake8-2020
"BLE", # flake8-blind-except
# "FBT", # flake8-boolean-trap
# "B", # flake8-bugbear
"C4", # flake8-comprehensions
"T10", # flake8-debugger
"FA", # flake8-future-annotations
# "EM", # flake8-errmsg
"ISC", # flake8-implicit-str-concat
"INP", # flake8-no-pep420
"PIE", # flake8-pie
"T20", # flake8-print
# "PT", # flake8-pytest-style
"RSE", # flake8-raise
"RET", # flake8-return
"SIM", # flake8-simplify
"TCH", # flake8-type-checking
# "ARG", # flake8-unused-arguments
"PTH", # flake8-use-pathlib
# "ERA", # eradicate
"PD", # pandas-vet
"PGH", # pygrep-hooks
"NPY", # NumPy-specific
"RUF", # Ruff-specific
]
# Not actually external but we deactivated them for now
external = ["D400", "D403", "D107", "D414"]
ignore = [
"D202",
"D213",
"D203",
"ISC002",
"RUF001",
"RUF002",
"RUF003",
"B008",
# Covered by formatter
"ISC001",
]
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
unfixable = ["F401"]
[lint.per-file-ignores]
"*/test_*.py" = ["ARG001", "RUF012", "N811", "T20", "PIE804"]
"*/__init__.py" = ["F401"]
"glotaran/builtin/io/netCDF/netCDF.py" = ["N999"]
"docs/*" = ["INP001"]
# Needs a full rewrite anyway
"glotaran/builtin/io/ascii/wavelength_time_explicit_file.py" = ["PTH"]
[lint.isort]
required-imports = ["from __future__ import annotations"]
known-first-party = ["glotaran"]
force-single-line = true