-
-
Notifications
You must be signed in to change notification settings - Fork 117
/
pyproject.toml
56 lines (51 loc) · 1.42 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
[tool.black]
line-length = 120
include = '\.pyi?$'
target-version = ["py38", "py39", "py310", "py311", "py312"]
[tool.ruff]
# Adds to default excludes: https://docs.astral.sh/ruff/settings/#exclude
extend-exclude = [
".*/",
"drf_source",
"stubgen",
"out",
]
line-length = 120
target-version = "py38"
# See Rules in Ruff documentation: https://docs.astral.sh/ruff/rules/
[tool.ruff.lint]
select = [
"B", # bugbear
"E", # pycodestyle
"F", # pyflakes
"INP", # flake8-tidy-imports
"W", # pycodestyle
"I", # isort
"UP", # pyupgrade
"TID251", # Disallowed imports (flake8-tidy-imports.banned-api)
"PYI", # flake8-pyi
"RUF100", # Equivalent to flake8-noqa NQA103
"PGH004", # Equivalent to flake8-noqa NQA104
"PGH003", # Disallowed blanket `type: ignore` annotations.
]
ignore = ["PYI021", "PYI024", "PYI041", "PYI043"]
[tool.ruff.lint.per-file-ignores]
"*.pyi" = [
"B",
"E501",
"E741",
"E743",
"F403", # Use wildcard import
"F405",
"F822",
"F821",
"PGH003", # TODO fix these errors
]
"rest_framework-stubs/compat.pyi" = ["PYI042"]
[tool.ruff.lint.flake8-tidy-imports.banned-api]
"_typeshed.Self".msg = "Use typing_extensions.Self (PEP 673) instead."
[tool.ruff.lint.isort]
split-on-trailing-comma = false
extra-standard-library = ["_typeshed"]
[build-system]
requires = ["setuptools", "wheel"]