forked from SeleniumHQ/selenium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
74 lines (68 loc) · 2.05 KB
/
tox.ini
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
[tox]
envlist = docs, flake8, isort, validate-pyproject
[testenv:validate-pyproject]
skip_install = true
deps =
validate-pyproject==0.23
packaging==24.2
commands =
validate-pyproject ./pyproject.toml
[testenv:docs]
skip_install = true
deps =
-r {toxinidir}/docs/requirements.txt
-r {toxinidir}/requirements.txt
commands =
; regenerate autodoc stub pages
sphinx-autogen docs/source/api.rst
; build api docs
sphinx-build -b html -d ../build/docs/doctrees docs/source ../build/docs/api/py {posargs}
setenv =
PYTHONPATH = {toxinidir}/.
[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}
[testenv:linting-ci]
; checks linting for CI with stricter exiting when failing.
skip_install = true
deps =
isort==5.13.2
black==24.1.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.9
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.13.2
black==24.1.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.9
docformatter --in-place -r selenium/
[flake8]
exclude = .tox,selenium/webdriver/common/devtools,docs/source/conf.py,*venv
# Disable this once black is applied throughout & line length is better handled.
extend-ignore = E501, E203
# This does nothing for now as E501 is ignored.
max-line-length = 120