-
Notifications
You must be signed in to change notification settings - Fork 56
/
Copy pathpyproject.toml
173 lines (158 loc) · 5.15 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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
[build-system]
# Minimum requirements for the build system to execute.
requires = ["setuptools", "wheel"] # PEP 508 specifications.
[project]
name = "darker"
version = "2.1.1"
authors = [{name = "Antti Kaihola", email = "[email protected]"}]
license = {text = "BSD"}
description = "Apply Black formatting only in regions changed since last commit"
classifiers = [
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
requires-python = ">=3.9"
dependencies = [
"black>=24.10.0",
"darkgraylib~=2.2.0",
"toml>=0.10.0",
"typing_extensions>=4.0.1",
"darkgray-dev-tools",
"defusedxml>=0.7.1",
"flynt>=0.76",
"isort>=5.0.1",
"mypy>=0.990",
"packaging",
"pathspec", # to test `gen_python_files` in `test_black_diff.py`
"pydocstyle",
"pygments>=2.4.0",
"pyupgrade>=2.31.0",
"pylint>=3.2.7",
"pylint-per-file-ignores",
"pytest>=6.2.0",
"pytest-kwparametrize>=0.0.3",
"pyupgrade>=2.31.0",
"regex>=2021.4.4",
"requests_cache>=0.7",
"ruamel.yaml>=0.17.21",
"ruff>=0.0.292",
"twine>=2.0.0",
"types-requests>=2.27.9",
"types-toml>=0.10.4",
"wheel>=0.21.0",
"astor>=0.8.1",
]
dynamic = ["readme"]
[dependency-groups]
dev = [
"black>=22.3.0",
"darkgray-dev-tools~=0.1.1",
"defusedxml>=0.7.1",
"flynt>=0.76",
"isort>=5.0.1",
"mypy>=0.990",
"packaging",
"pathspec", # to test `gen_python_files` in `test_black_diff.py`
"pydocstyle",
"pygments>=2.4.0",
"pyupgrade>=2.31.0",
"pylint>=3.2.7",
"pylint-per-file-ignores",
"pytest>=6.2.0",
"pytest-kwparametrize>=0.0.3",
"pyupgrade>=2.31.0",
"regex>=2021.4.4",
"requests_cache>=0.7",
"ruamel.yaml>=0.17.21",
"ruff>=0.0.292",
"twine>=2.0.0",
"types-requests>=2.27.9",
"types-toml>=0.10.4",
"wheel>=0.21.0",
"astor>=0.8.1",
]
[project.urls]
Homepage = "https://github.com/akaihola/darker"
"Source Code" = "https://github.com/akaihola/darker"
"Change Log" = "https://github.com/akaihola/darker/blob/master/CHANGES.rst"
News = "https://github.com/akaihola/darker/discussions/categories/announcements"
[project.entry-points."darker.formatter"]
black = "darker.formatters.black_formatter:BlackFormatter"
ruff = "darker.formatters.ruff_formatter:RuffFormatter"
pyupgrade = "darker.formatters.pyupgrade_formatter:PyupgradeFormatter"
none = "darker.formatters.none_formatter:NoneFormatter"
[project.scripts]
darker = "darker.__main__:main_with_error_handling"
[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 = ["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.MASTER]
load-plugins = [
"pylint_per_file_ignores",
]
[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"]
per-file-ignores = [
"/stubs/:missing-class-docstring,missing-function-docstring,unused-argument",
]
[tool.ruff]
target-version = "py39"
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"A002", # builtin-argument-shadowing
"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)
"ISC001", # Checks for implicitly concatenated strings on a single line
]
[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__`
"ARG001", # Unused function argument
"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"]