forked from SeleniumHQ/selenium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
68 lines (59 loc) · 1.91 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
[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==0.991
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=37
force_single_line = True
[testenv:linting-check]
; checks linting for CI with stricter exiting when failing.
skip_install = true
deps =
isort==5.11.2
black==22.12.0
; flake8 6+ requires python3.8+ specifically.
flake8==5.0.4
flake8-typing-imports==1.14.0
docformatter==1.5.0
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.7
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.11.2
black==22.12.0
; flake8 6+ requires python3.8+ specifically.
flake8==5.0.4
flake8-typing-imports==1.14.0
docformatter==1.5.0
commands =
isort selenium/ test/ conftest.py
black selenium/ test/ conftest.py -l 120
flake8 selenium/ test/ --min-python-version=3.7
docformatter --in-place -r selenium/