-
Notifications
You must be signed in to change notification settings - Fork 55
/
pyproject.toml
78 lines (68 loc) · 2.59 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
[build-system]
# Minimum requirements for the build system to execute.
requires = ["setuptools", "wheel"] # PEP 508 specifications.
[tool.black]
# Darker makes Black read its configuration from the file indicated by the `--config`
# option, so we need to mirror the same configuration here and in `check-darker.toml`.
skip-string-normalization = false
target-version = ["py38", "py39", "py310", "py311", "py312"]
[tool.isort]
# Darker makes isort read its configuration from the file indicated by the `--config`
# option, so we need to mirror the same configuration here and in `check-darker.toml`.
profile = "black"
known_first_party = ["darkgraylib", "graylint"]
known_third_party = ["pytest"]
[tool.darker]
# Only minimal options for Darker by default, so it's easier to test while developing.
# To check Darker's own code base with the full set of reformatters and linters, use:
# $ darker --config=check-darker.toml
src = [
"action",
"release_tools",
"src",
"setup.py",
]
revision = "origin/master..."
[tool.graylint]
revision = "origin/master..."
src = ["."]
[tool.pylint."messages control"]
# Check import order only with isort. Pylint doesn't support a custom list of first
# party packages. We want to consider "darkgraylib" and "graylint" as first party.
disable = ["wrong-import-order"]
[tool.ruff]
target-version = "py38"
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"A002", # builtin-argument-shadowing
"ANN101", # Missing type annotation for `self` in method
"COM812", # Trailing comma missing
"D203", # One blank line required before class docstring
"D213", # Multi-line docstring summary should start at the second line
"D400", # First line should end with a period (duplicates D415)
# Remove these when support for Python 3.8 is dropped:
"UP006", # Use `xyz` instead of `Xyz` for type annotation
"UP007", # Use `X | Y` for type annotations
]
[tool.ruff.lint.per-file-ignores]
"action/*.py" = [
"T201", # `print` found
]
"action/tests/*.py" = [
"S101", # Use of `assert` detected
]
"src/darker/__main__.py" = [
"T201", # `print` found
]
"src/darker/tests/*.py" = [
"ANN001", # Missing type annotation for function argument
"ANN201", # Missing return type annotation for public function
"ANN204", # Missing return type annotation for special method `__init__`
"C408", # Unnecessary `dict` call (rewrite as a literal)
"PLR0913", # Too many arguments in function definition (n > 5)
"S101", # Use of `assert` detected
]
[tool.ruff.lint.isort]
known-first-party = ["darkgraylib", "graylint"]
known-third-party = ["pytest"]