-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathruff.toml
More file actions
110 lines (102 loc) · 1.83 KB
/
ruff.toml
File metadata and controls
110 lines (102 loc) · 1.83 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
line-length = 79
target-version = "py312"
indent-width = 4
exclude = [
".git",
".venv",
"venv",
"build",
"dist",
"__pycache__",
".idea",
".pytest_cache",
".ruff_cache",
"mypy_cache",
"htmlcov",
".gitignore",
".dockerignore",
"Dockerfile",
"docker-compose.yml",
"**/*.mdc",
]
[format]
[lint]
select = [
# See https://docs.astral.sh/ruff/rules/
#
# pep8-naming
"N",
# flake8-annotations
"ANN",
# flake8-async
"ASYNC",
# FastApi
"FAST",
# flake8-bandit
"S",
# flake8-blind-except
"BLE",
# flake8-print
"T20",
# flake8-bugbear
"B",
# Pyflakes
"F",
# isort
"I",
# pycodestyle errors
"E",
# pycodestyle warnings
"W",
# pyupgrade
"UP",
# builtins
"A",
# erradicate
"ERA",
# flake8-comprehensions
"C4",
# flake8-pytest-style
"PT",
# pygrep-hooks
"PGH",
# flake8-unused-arguments
"ARG",
# flake8-implicit-str-concat
"ISC",
# flake8-raise
"RSE",
# Perflint
"PERF"
]
ignore = [
# Allow using Any as type hint in special cases
"ANN401",
# Allow using assert in codebase
"S101",
# Allow raising exceptions without "from err" or "from None"
"B904",
# Ruff conflicting rules
# see https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
"W191",
"E111",
"E114",
"E117",
]
[lint.per-file-ignores]
"conftest.py" = [
# flake8-bandit is not checked
"S",
]
"test_*.py" = [
# flake8-bandit is not checked
"S",
# return type annotation is not enforced in test functions
"ANN201"
]
[lint.pep8-naming]
classmethod-decorators = ["pydantic.model_validator"]
[lint.flake8-annotations]
suppress-dummy-args = true
[lint.flake8-pytest-style]
parametrize-names-type = "csv"