-
Notifications
You must be signed in to change notification settings - Fork 6
/
pyproject.toml
124 lines (113 loc) · 2.01 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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# Default tool config file. See also setup.cfg for tools that don't yet
# support pyproject.toml.
[tool.black]
line-length = 88
target-version = ['py39']
skip-string-normalization = true
include = '\.pyi?$'
exclude = '''
/(
\.eggs
| \.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| _build
| __pycache__
| buck-out
| build
| dist
| node_modules
| funnel/assets
)/
'''
[tool.ruff]
# Same as Black.
line-length = 88
# Target Python 3.9
target-version = "py39"
[tool.ruff.lint]
select = [
"A",
"ARG",
"ASYNC",
"B",
"BLE",
"C",
"C4",
"E",
"EM",
"EXE",
"F",
"FA",
"G",
"I",
"INP",
"INT",
"ISC",
"N",
"PIE",
"PT",
"PYI",
"RET",
"RUF",
"S",
"SIM",
"SLOT",
"T20",
"TRIO",
"UP",
"W",
"YTT",
]
ignore = [
"ARG002",
"C901",
"D105",
"D106",
"D107",
"D203",
"D212",
"D213",
"E402",
"E501",
"EM101",
"EM102",
"ISC001",
]
# Allow autofix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []
[tool.ruff.lint.extend-per-file-ignores]
"tests/**.py" = [
"S101", # Allow assert
"ANN001", # Args don't need types (usually fixtures)
"N802", # Fixture returning a class may be named per class name convention
"N803", # Args don't require naming convention (fixture could be a class)
"INP001", # Don't need `__init__.py` in tests/
]
"docs/**.py" = ["INP001", "RUF012"]
[tool.ruff.lint.mccabe]
# Unlike Flake8, default to a complexity level of 10.
max-complexity = 10
[tool.ruff.lint.isort]
# These config options should match isort config above under [tool.isort]
combine-as-imports = true
extra-standard-library = ['typing_extensions']
split-on-trailing-comma = false
relative-imports-order = 'furthest-to-closest'
known-first-party = ['coaster']
section-order = [
'future',
'standard-library',
'third-party',
'first-party',
'local-folder',
]
[tool.ruff.lint.flake8-pytest-style]
fixture-parentheses = false
mark-parentheses = false
[tool.ruff.format]
docstring-code-format = true
quote-style = "preserve"