-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
82 lines (75 loc) · 2.07 KB
/
pyproject.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
79
80
81
82
# ===== ruff ====
[tool.ruff]
exclude = []
line-length = 119
target-version = 'py313'
preview = true
[tool.ruff.lint]
select = [
"A", # builtins
"ASYNC", # async
"B", # bugbear
"BLE", # blind-except
"C4", # comprehensions
"C90", # complexity
"COM", # commas
"D", # pydocstyle
"DJ", # django
"DOC", # pydoclint
"DTZ", # datetimez
"E", # pycodestyle
"EM", # errmsg
"ERA", # eradicate
"F", # pyflakes
"FBT", # boolean-trap
"FLY", # flynt
"G", # logging-format
"I", # isort
"ICN", # import-conventions
"ISC", # implicit-str-concat
"LOG", # logging
"N", # pep8-naming
"PERF", # perflint
"PIE", # pie
"PL", # pylint
"PTH", # use-pathlib
"Q", # quotes
"RET", # return
"RSE", # raise
"RUF", # Ruff
"S", # bandit
"SIM", # simplify
"SLF", # self
"SLOT", # slots
"T20", # print
"TRY", # tryceratops
"UP", # pyupgrade
]
ignore = [
"COM812", # handled by the formatter
"DOC501", # add possible exceptions to the docstring (TODO)
"ISC001", # handled by the formatter
"RUF012", # need more widespread typing
"SIM102", # Use a single `if` statement instead of nested `if` statements
"SIM108", # Use ternary operator instead of `if`-`else`-block
"TRY301", # I like to raise redundant exceptions if it's coming from a different module or even far away function
"PERF401", # I think list comprehensions are usually harder to read quickly
]
[tool.ruff.lint.mccabe]
max-complexity = 7
[tool.ruff.lint.per-file-ignores]
"**/{tests}/*" = [
"DOC201", # documenting return values
"DOC402", # documenting yield values
"PLR6301", # could be a static method
"S101", # use of assert
"S106", # hardcoded password
"SIM105", # try-except-pass
]
[tool.ruff.lint.pydocstyle]
convention = "google"
# ===== pytest ====
[tool.pytest.ini_options]
testpaths = ["backend/tests"]
pythonpath = ["."]
asyncio_default_fixture_loop_scope = "function"