-
Notifications
You must be signed in to change notification settings - Fork 5
/
.ruff.toml
78 lines (71 loc) · 1.67 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
# Exclude a variety of commonly ignored directories.
extend-exclude = [
"docs/conf.py",
"*.ipynb",
]
# Same as Black.
line-length = 99
# Assume Python 3.10.
target-version = "py310"
[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
"I", # isort (activates import sorting for formatter)
"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
"TC", # 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
]
ignore = [
"D202",
"D213",
"D203",
"ISC002",
"RUF001",
"RUF002",
"RUF003",
"B008",
# Covered by formatter
"ISC001",
]
external = ["DOC"]
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[lint.per-file-ignores]
"tests/*" = ["ARG001"]
"tests/data/*" = ["INP", "D"]
"tests/data/config/run_load_config_on_import.py" = [
"I002", # from __future__ import annotations
]
[lint.isort]
required-imports = ["from __future__ import annotations"]
known-first-party = ["pyglotaran_extras"]
force-single-line = true
[lint.pydocstyle]
convention = "numpy"