-
Notifications
You must be signed in to change notification settings - Fork 1
/
pyproject.toml
82 lines (69 loc) · 1.47 KB
/
pyproject.toml
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
75
76
77
78
79
80
81
82
[build-system]
requires = ["setuptools>=42", "wheel"]
build-backend = "setuptools.build_meta"
[tool.pytest.ini_options]
log_level = "INFO"
testpaths = ["tests"]
[tool.coverage.run]
branch = true
source = ["src"]
omit = ["src/libres/modules/__init__.py"]
[tool.mypy]
python_version = "3.10"
follow_imports = "silent"
namespace_packages = true
explicit_package_bases = true
warn_unused_ignores = true
warn_redundant_casts = true
warn_unreachable = true
disallow_any_generics = true
disallow_untyped_defs = true
plugins = "sqlmypy"
mypy_path = "$MYPY_CONFIG_FILE_DIR/src"
[tool.bandit]
exclude_dirs = ["tests"]
skips = ["B101"]
[tool.tox]
legacy_tox_ini = """
[tox]
envlist = py38,py39,py310,py311,flake8,bandit,mypy,report
[gh-actions]
python =
3.8: py38
3.9: py39
3.10: py310,flake8,bandit,mypy
3.11: py311
3.12: py312
[testenv]
usedevelop = true
setenv =
py{38,39,310,311,312}: COVERAGE_FILE = .coverage.{envname}
deps =
-e{toxinidir}[test]
commands = pytest --cov --cov-report= {posargs}
[testenv:flake8]
basepython = python3.10
skip_install = true
deps =
flake8
flake8-bugbear
commands = flake8 src/ tests/
[testenv:bandit]
basepython = python3.10
skip_install = true
deps =
bandit[toml]
commands = bandit -q -c pyproject.toml -r src
[testenv:mypy]
basepython = python3.10
deps =
-e{toxinidir}[mypy]
commands = mypy -p libres
[testenv:report]
deps =
coverage
skip_install = true
commands =
coverage combine
coverage report -m
"""