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
|
[tool.poetry]
name = "docformatter"
version = "1.7.7"
description = "Formats docstrings to follow PEP 257"
authors = ["Steven Myint"]
maintainers = [
"Doyle Rowland <doyle.rowland@reliaqual.com>",
]
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.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: Implementation',
'Programming Language :: Python :: Implementation :: PyPy',
'Programming Language :: Python :: Implementation :: CPython',
'License :: OSI Approved :: MIT License',
]
packages = [{include = "docformatter", from = "src"}]
[tool.poetry.dependencies]
python = "^3.9"
charset_normalizer = "^3.0.0"
tomli = {version = "^2.0.0", python = "<3.11", optional = true}
untokenize = "^0.1.1"
[tool.poetry.group.dev.dependencies]
Sphinx = "^6.0.0"
tox = "<4.0.0"
twine = "^4.0.0"
[tool.poetry.group.testing.dependencies]
coverage = {extras = ["toml"], version = "^6.4.0"}
mock = "^4.0.0"
pytest = "^7.1.0"
pytest-cov = "^4.0.0"
[tool.poetry.group.linting.dependencies]
autopep8 = "^2.0.0"
black = ">=22,<25"
isort = "^5.10.0"
mypy = "0.991"
pycodestyle = "^2.8.0"
pydocstyle = "^6.1.1"
pylint = "^2.14.0"
rstcheck = "^6.1.0"
ruff = "^0.0.267"
[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 = ['py39', 'py310', 'py311', 'py312', 'py313']
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 =
py39
py310
py311
py312
py313
pypy3
coverage
style
isolated_build = true
skip_missing_interpreters = true
skipsdist = true
[gh-actions]
python =
3.9: py39
3.10: py310
3.11: py311
3.12: py312
3.13: py313
pypy-3.9: 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 = py39, py310, py311, py312, py313, 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
"""
|