-
Notifications
You must be signed in to change notification settings - Fork 2
/
pyproject.toml
107 lines (92 loc) · 2.16 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
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
[tool.pytest.ini_options]
minversion = 6.0
addopts = """
-ra
--import-mode=importlib
"""
python_files = [
"test_*.py",
"*_test.py",
"*Test.py"
]
python_classes = ["*Test"]
testpaths = [
"tests/unit",
"tests/integration"
]
# Ignore DeprecationWarnings in external libraries (because we can't do anything about them)
filterwarnings = [
"error",
"ignore::DeprecationWarning:dns.*",
"ignore::DeprecationWarning:kombu.*",
"ignore::DeprecationWarning:.*blinker.*",
"ignore::DeprecationWarning:.*pyparsing.*",
"ignore::DeprecationWarning:.*celery.*",
"ignore::DeprecationWarning:.*flask.testing",
"ignore::DeprecationWarning:.*werkzeug.urls.*",
]
[tool.ruff]
lint.select = [
"F", # pyflakes
"I", # isort
"S", # flake8-bandit
"ASYNC", # flake8-async
"ISC", # flake8-implicit-str-concat
"LOG", # flake8-logging
"INP", # flake8-no-pep420 (missing __init__.py)
"PIE", # flake8-pie
"T20", # flake8-print
"Q", # flake8-quotes
"TID", # flake8-tidy-imports
"FLY", # flynt (use f-string instead of static join)
]
# Enable preview rules since a lot of basic pycodestyle rules are in preview mode for some reason
preview = true
lint.ignore = [
"B008", # do not perform function calls in argument defaults
"C901", # too complex
"ISC001", # single-line-implicit-string-concatenation - conflicts with formatter
]
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".hg",
".mypy_cache",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
]
line-length = 120
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"]
"tests/*" = [
# Allow assert
"S101",
# Ignore unsafe practices like hardcoded passwords
"S101", "S105", "S106",
# Don't require __init__.py files
"INP",
]
"migrations/*" = [
# Don't require __init__.py files
"INP",
]
[tool.ruff.lint.flake8-quotes]
inline-quotes = "single"
multiline-quotes = "double"
docstring-quotes = "double"
[tool.ruff.format]
quote-style = "single"