Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/do-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ jobs:
with:
fetch-depth: 0
- name: Lint code base
run: tox -e style
run: tox -e pre-commit
2 changes: 1 addition & 1 deletion .github/workflows/do-update-authors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,4 @@ jobs:
author_email: [email protected]
committer_name: GitHub Actions
committer_email: [email protected]
push: true
push: true
13 changes: 7 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
exclude: 'tests/'
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
Expand Down Expand Up @@ -25,35 +26,35 @@ repos:
- id: isort
args: [--settings-file, ./pyproject.toml]
- repo: https://github.com/PyCQA/docformatter
rev: v1.7.6
rev: v1.7.7
hooks:
- id: docformatter
additional_dependencies: [tomli]
args: [--in-place, --config, ./pyproject.toml]
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: 'v0.11.9'
rev: 'v0.12.4'
hooks:
- id: ruff
args: [ --select, "PL", --select, "F" ]
args: [ --config, ./pyproject.toml ]
- repo: https://github.com/pycqa/pydocstyle
rev: 6.3.0
hooks:
- id: pydocstyle
additional_dependencies: [toml]
args: [--config, ./pyproject.toml]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.15.0
rev: v1.17.0
hooks:
- id: mypy
additional_dependencies: [types-python-dateutil]
args: [--config-file, ./pyproject.toml]
- repo: https://github.com/myint/eradicate
rev: '2.3.0'
rev: '3.0.0'
hooks:
- id: eradicate
args: []
- repo: https://github.com/rstcheck/rstcheck
rev: 'v6.2.4'
rev: 'v6.2.5'
hooks:
- id: rstcheck
additional_dependencies: [tomli]
Expand Down
3 changes: 0 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,3 @@ Bug Fixes
## [v1.4](https://github.com/PyCQA/docformatter/tree/v1.4) (2020-12-27)

[Full Changelog](https://github.com/PyCQA/docformatter/compare/v1.3.1...v1.4)



2 changes: 1 addition & 1 deletion docs/source/authors.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Authors
=======

.. include:: ../../AUTHORS.rst
.. include:: ../../AUTHORS.rst
2 changes: 1 addition & 1 deletion docs/source/license.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
License
=======

.. literalinclude:: ../../LICENSE
.. literalinclude:: ../../LICENSE
152 changes: 48 additions & 104 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -178,114 +178,58 @@ line_length = 88
report = "warning"
ignore_directives = [
"automodule",
"literalinclude",
"tabularcolumns",
"toctree",
]
ignore_messages = [
"Possible title underline"
]
ignore_roles = [
"numref",
"ref",
]

[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
pytest-order
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 integration \
--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
"""
[tool.ruff]
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".ipynb_checkpoints",
".mypy_cache",
".nox",
".pants.d",
".pyenv",
".pytest_cache",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
".vscode",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"site-packages",
"venv",
"tests/",
]
line-length = 88
indent-width = 4
target-version = "py39"

[tool.ruff.lint]
select = ["E", "F", "PL"]
ignore = []

[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
Loading
Loading