-
Notifications
You must be signed in to change notification settings - Fork 68
/
pyproject.toml
285 lines (262 loc) · 6.34 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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
[tool.poetry]
name = "docformatter"
version = "1.7.5"
description = "Formats docstrings to follow PEP 257"
authors = ["Steven Myint"]
maintainers = [
"Doyle Rowland <[email protected]>",
]
license = "Expat"
readme = "README.rst"
homepage = "https://github.com/PyCQA/docformatter"
repository = "https://github.com/PyCQA/docformatter"
documentation = "https://docformatter.readthedocs.io/en/latest/"
keywords = [
"PEP 257", "pep257", "style", "formatter", "docstrings",
]
classifiers=[
'Intended Audience :: Developers',
'Environment :: Console',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: Implementation',
'Programming Language :: Python :: Implementation :: PyPy',
'Programming Language :: Python :: Implementation :: CPython',
'License :: OSI Approved :: MIT License',
]
packages = [{include = "docformatter", from = "src"}]
include = ["LICENSE"]
[tool.poetry.dependencies]
python = "^3.7"
charset_normalizer = "^3.0.0"
tomli = {version = "^2.0.0", python = "<3.11", optional = true}
untokenize = "^0.1.1"
[tool.poetry.dev-dependencies]
autopep8 = "^2.0.0"
black = "^22.0.0"
coverage = {extras = ["toml"], version = "^6.4.0"}
isort = "^5.10.0"
mock = "^4.0.0"
mypy = "0.991"
pycodestyle = "^2.8.0"
pydocstyle = "^6.1.1"
pylint = [
{version = "^2.12.0", python = "<3.7.2"},
{version = "^2.14.0", python = ">=3.7.2"},
]
pytest = "^7.1.0"
pytest-cov = "^4.0.0"
ruff = "^0.0.267"
rstcheck = "^6.1.0"
tox = "<4.0.0"
Sphinx = [
{version = "5.3.0", python = "<3.8"},
{version = "^6.0.0", python = ">=3.8"},
]
twine = "^4.0.0"
[tool.poetry.extras]
tomli = ["tomli"]
[tool.poetry.scripts]
docformatter = "docformatter.__main__:main"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.pylint.master]
ignore-paths = [
"tests*",
]
[tool.pylint.messages_control]
disable = [
"fixme",
"import-outside-toplevel",
"inconsistent-return-statements",
"invalid-name",
"no-else-return",
"no-member",
"too-few-public-methods",
"too-many-arguments",
"too-many-boolean-expressions",
"too-many-locals",
"too-many-return-statements",
"useless-object-inheritance",
]
[tool.docformatter]
black = true
non-strict = false
non-cap = [
"docformatter",
]
[tool.mypy]
allow_subclassing_any = true
follow_imports = "skip"
implicit_reexport = true
ignore_missing_imports = true
[tool.pydocstyle]
convention = "pep257"
[tool.pytest.ini_options]
markers = [
"unit: mark the test as a unit test.",
"system: mark the test as a system test.",
]
[tool.coverage.run]
branch = true
cover_pylib = false
omit = [
'*/site-packages/*',
'*/*pypy/*',
'*/tests/*',
'__init__.py',
'setup.py',
]
relative_files = true
[tool.coverage.report]
omit = [
'*/site-packages/*',
'*/*pypy/*',
'*/tests/*',
'__init__.py',
'setup.py',
]
exclude_lines = [
'pragma: no cover',
'import',
]
show_missing = true
[tool.coverage.xml]
output = 'coverage.xml'
[tool.black]
line-length = 88
target-version = ['py37', 'py38', 'py39', 'py310', 'py311']
include = '\.pyi?$'
exclude = '''
/(
\.eggs
| \.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| _build
| buck-out
| build
| dist
)/
'''
[tool.isort]
known_first_party = 'docformatter'
known_third_party = ['toml']
import_heading_firstparty = 'docformatter Package Imports'
import_heading_localfolder = 'docformatter Local Imports'
import_heading_stdlib = 'Standard Library Imports'
import_heading_thirdparty = 'Third Party Imports'
multi_line_output = 3
include_trailing_comma = true
force_grid_wrap = 0
use_parentheses = true
ensure_newline_before_comments = true
line_length = 88
[tool.rstcheck]
report = "warning"
ignore_directives = [
"automodule",
"tabularcolumns",
"toctree",
]
ignore_roles = [
"numref",
]
[tool.tox]
legacy_tox_ini = """
[tox]
envlist =
py37
py38
py39
py310
py311
pypy3
coverage
style
isolated_build = true
skip_missing_interpreters = true
skipsdist = true
[gh-actions]
python =
3.7: py37
3.8: py38
3.9: py39
3.10: py310
3.11: py311
pypy-3.8: pypy3
[testenv]
description = run the test suite using pytest under {basepython}
deps =
charset_normalizer
coverage[toml]
mock
pytest
pytest-cov
tomli
untokenize
setenv =
COVERAGE_FILE = {toxworkdir}/.coverage.{envname}
commands =
pip install -U pip
pip install --prefix={toxworkdir}/{envname} -e .[tomli]
pytest -s -x -c {toxinidir}/pyproject.toml \
-m unit \
--cache-clear \
--cov=docformatter \
--cov-config={toxinidir}/pyproject.toml \
--cov-branch \
{toxinidir}/tests/
pytest -s -x -c {toxinidir}/pyproject.toml \
-m system \
--cache-clear \
--cov=docformatter \
--cov-config={toxinidir}/pyproject.toml \
--cov-branch \
--cov-append \
{toxinidir}/tests/
[testenv:coverage]
description = combine coverage data and create report
setenv =
COVERAGE_FILE = {toxworkdir}/.coverage
skip_install = true
deps =
coverage[toml]
parallel_show_output = true
commands =
coverage combine
coverage report -m
coverage xml -o {toxworkdir}/coverage.xml
depends = py37, py38, py39, py310, py311, pypy3
[testenv:style]
description = run autoformatters and style checkers
deps =
charset_normalizer
pycodestyle
pydocstyle
ruff==0.0.269
rstcheck
toml
untokenize
commands =
pip install -U pip
pip install .
docformatter --black --recursive {toxinidir}/src/docformatter
pycodestyle --exclude=.git,.tox,*.pyc,*.pyo,build,dist,*.egg-info,config,docs,locale,tests,tools --ignore=C326,C330,E121,E123,E126,E133,E203,E242,E265,E402,W503,W504 --format=pylint --max-line-length=88 {toxinidir}/src/docformatter
pydocstyle {toxinidir}/src/docformatter
ruff check --select "PL" --select "F" {toxinidir}/src/docformatter
rstcheck --report-level=1 {toxinidir}/README.rst
[testenv:docs]
description = build docformatter documentation
allowlist_externals = make
changedir = docs
commands =
make html
"""