-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
45 lines (41 loc) · 1.36 KB
/
Copy pathpyproject.toml
File metadata and controls
45 lines (41 loc) · 1.36 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
[tool.black]
line-length = 120
target-version = ["py312"]
# The previous include pattern had a doubled backslash in a single-quoted TOML string, producing
# a regex of \\.(py)$ which effectively looked for a literal backslash followed by any character,
# and never matched Linux paths. This resulted in: "No Python files are present to be formatted.".
# Use a simpler, correct pattern matching any .py file.
include = '\.py$'
## Black's "exclude" is a regular expression applied to the full *normalized* path.
## Anchor the virtual environment directory so Black never traverses it. The prior pattern
## relied on a leading and trailing slash wrapper that was fragile and whitespace-sensitive.
exclude = '''
(
(^|/)(\.venv|build|dist)/
| migrations/versions
| .*_pb2\.py$
)
'''
[tool.isort]
profile = "black"
line_length = 120
multi_line_output = 3
combine_as_imports = true
include_trailing_comma = true
force_grid_wrap = 0
use_parentheses = true
[tool.ruff]
line-length = 120
exclude = [".venv","app/static/iconography","app/static/*.svg"]
[tool.ruff.lint]
select = [
"E","F","W", # pycodestyle/pyflakes
"I", # isort
"UP", # pyupgrade
"B", # bugbear
"SIM", # simplify
"C4" # comprehensions
]
ignore = ["E203","W503"]
[tool.ruff.lint.per-file-ignores]
# (No longer ignoring E501 for tests; global line-length relaxed to 120.)