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
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,21 @@ repos:
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 23.1.0
rev: 23.3.0
hooks:
- id: black
args: [--safe]
- repo: https://github.com/asottile/blacken-docs
rev: 1.13.0
hooks:
- id: blacken-docs
additional_dependencies: [black==23.1]
additional_dependencies: [black==23.3]
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
- id: rst-backticks
- repo: https://github.com/tox-dev/tox-ini-fmt
rev: "0.6.1"
rev: "1.0.0"
hooks:
- id: tox-ini-fmt
args: ["-p", "fix"]
Expand All @@ -49,7 +49,7 @@ repos:
hooks:
- id: flake8
additional_dependencies:
- flake8-bugbear==23.3.12
- flake8-bugbear==23.3.23
- flake8-comprehensions==3.11.1
- flake8-pytest-style==1.7.2
- flake8-spellcheck==0.28
Expand Down
24 changes: 12 additions & 12 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[tox]
minversion = 3.14.0
envlist =
fix
py310
Expand All @@ -9,46 +10,45 @@ envlist =
pkg_check
isolated_build = true
skip_missing_interpreters = true
minversion = 3.14.0

[testenv]
description = run the unit tests with pytest under {basepython}
package = wheel
wheel_build_env = .pkg
extras =
test
setenv =
COVERAGE_FILE = {toxworkdir}/.coverage.{envname}
COVERAGE_PROCESS_START = {toxinidir}/setup.cfg
_COVERAGE_SRC = {envsitepackagesdir}/sphinx_argparse_cli
extras =
test
commands =
pytest {tty:--color=yes} {posargs: \
--junitxml {toxworkdir}{/}junit.{envname}.xml --cov {envsitepackagesdir}{/}sphinx_argparse_cli \
--cov {toxinidir}{/}tests --cov-fail-under=100 \
--cov-config=pyproject.toml --no-cov-on-fail --cov-report term-missing:skip-covered --cov-context=test \
--cov-report html:{envtmpdir}{/}htmlcov --cov-report xml:{toxworkdir}{/}coverage.{envname}.xml \
tests}
package = wheel
wheel_build_env = .pkg

[testenv:fix]
description = run static analysis and style check using flake8
passenv =
HOMEPATH
PROGRAMDATA
basepython = python3.10
skip_install = true
deps =
pre-commit>=3.2
pre-commit>=3.2.1
passenv =
HOMEPATH
PROGRAMDATA
commands =
pre-commit run --all-files --show-diff-on-failure
python -c 'print("hint: run {envdir}/bin/pre-commit install to add checks as pre-commit hook")'

[testenv:type]
description = run type check on code base
setenv =
{tty:MYPY_FORCE_COLOR = 1}
deps =
mypy==1.1.1
types-docutils>=0.19.1.6
types-docutils>=0.19.1.7
setenv =
{tty:MYPY_FORCE_COLOR = 1}
commands =
mypy src
mypy tests
Expand Down