summaryrefslogtreecommitdiffstats
path: root/ansible_collections/cloud/common/tox.ini
blob: ecb7669dff8cd300400ef965c6ddac08ee5664ad (plain)
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
[tox]
minversion = 1.4.2
envlist = linters
skipsdist = True

[common]

format_dirs = {toxinidir}/plugins {toxinidir}/tests

[testenv]
deps = -r{toxinidir}/requirements.txt
       -r{toxinidir}/test-requirements.txt
install_command = pip install {opts} {packages}

[testenv:isort]
deps =
  isort
commands =
  isort --profile black {[common]format_dirs}

[testenv:flynt]
deps =
  flynt
commands =
  flynt {[common]format_dirs}

[testenv:black]
depends =
  flynt, isort
deps =
  black >=23.0, <24.0
commands =
  black {[common]format_dirs}

[testenv:linters]
install_command = pip install {opts} {packages}
deps =
  {[testenv:black]deps}
  {[testenv:isort]deps}
  {[testenv:flynt]deps}
  flake8
commands =
  flynt {[common]format_dirs}
  isort --profile black {[common]format_dirs}
  black -v --check {[common]format_dirs}
  flake8 {posargs} {[common]format_dirs}

[flake8]
# E123, E125 skipped as they are invalid PEP-8.
show-source = True
ignore = E123,E125,E203,E402,E501,E741,F401,F811,F841,W503
max-line-length = 160
builtins = _
exclude = .git,.tox,tests/unit/compat/

[testenv:antsibull-changelog]
deps =
  ansible-core==2.11.*
  antsibull-changelog
commands =
  antsibull-changelog {posargs}