chore: add testing and type checks to tox.ini

This commit is contained in:
Benex254
2024-08-06 21:25:39 +03:00
parent 80b4185513
commit 28cc74693e

37
tox.ini
View File

@@ -1,26 +1,27 @@
[tox]
requires =
tox>=4
env_list = lint, type, py{310,311}
env_list = lint, pyright, py{310,311}
[testenv]
description = run unit tests
deps =poetry
commands =
poetry install
poetry run pytest
; [testenv]
; description = run unit tests
; deps =
; pytest>=7
; pytest-sugar
; commands =
; pytest {posargs:tests}
;
[testenv:lint]
description = run linters
skip_install = true
deps =
black==22.12
commands = black {posargs:.}
deps =poetry
commands =
poetry install
poetry run black .
[testenv:type]
description = run type checks
deps =
mypy>=0.991
commands =
mypy {posargs:src tests}
[testenv:pyright]
description = run type checking
skip_install = true
deps =poetry
commands =
poetry install --no-root
poetry run pyright