blob: 1d418898f5ebe39c8db9f5a8bef0b60bf54eabdb [file] [log] [blame]
[tox]
envlist = docs, flake8, isort
[testenv:docs]
skip_install = true
deps =
Jinja2==3.0.3
Sphinx==1.8.2
commands = sphinx-build -b html -d ../build/doctrees docs/source ../build/docs/api/py {posargs}
[testenv:mypy]
skip_install = true
deps =
mypy==1.4.1
lxml==4.9.1
types-urllib3==1.26.25
types-certifi==2021.10.8.3
trio-typing==0.7.0
commands = mypy --install-types {posargs}
[isort]
; isort is a common python tool for keeping imports nicely formatted.
; Automatically keep imports alphabetically sorted, on single lines in
; PEP recommended sections (https://peps.python.org/pep-0008/#imports)
; files or individual lines can be ignored via `# isort:skip|# isort:skip_file`.
profile = black
py_version=38
force_single_line = True
[testenv:linting-ci]
; checks linting for CI with stricter exiting when failing.
skip_install = true
deps =
isort==5.12.0
black==23.9.1
flake8==6.1.0
flake8-typing-imports==1.14.0
docformatter==1.7.5
commands =
; execute isort in check only mode.
isort --check-only --diff selenium/ test/ conftest.py
; execute black in check only mode with diff.
black --check --diff selenium/ test/ conftest.py -l 120
flake8 selenium/ test/ --min-python-version=3.8
docformatter --check -r selenium/
[testenv:linting]
; A consolidated linting based recipe, responsible for executing linting tools across the code base.
; This encompasses isort for imports, black for general formatting and flake8.
; IMPORTANT: black & isort rewrite files, flake8 merely alerts to the failure.
skip_install = true
deps =
isort==5.12.0
black==23.9.1
flake8==6.1.0
flake8-typing-imports==1.14.0
docformatter==1.7.5
commands =
isort selenium/ test/ conftest.py
black selenium/ test/ conftest.py -l 120
flake8 selenium/ test/ --min-python-version=3.8
docformatter --in-place -r selenium/