-
Notifications
You must be signed in to change notification settings - Fork 946
Expand file tree
/
Copy pathtox.ini
More file actions
64 lines (55 loc) · 1.86 KB
/
tox.ini
File metadata and controls
64 lines (55 loc) · 1.86 KB
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
[tox]
envlist = flake8,black,isort,mypy,py37,py38,py39,py310,py311,py312,py313
[testenv]
passenv =
#http://tox.readthedocs.io/en/latest/config.html#confval-passenv=SPACE-SEPARATED-GLOBNAMES
*
commands =
# Install main package and all sub-packages
pip install -r requirements/requirements-tests-install.txt
pip install .
# Early verification that module is loadable
python3 -c 'import confluent_kafka ; print(confluent_kafka.version())'
# Run tests (large timeout to allow docker image downloads)
python3 -m pytest --timeout 600 --ignore=tmp-build {posargs}
# See tests/README.md for additional notes on testing
#python3 tests/integration/integration_test.py
[testenv:flake8]
deps = flake8
commands = flake8
[testenv:mypy]
deps =
mypy
types-cachetools
types-requests~=2.32.0
commands =
# Need attrs to be explicitly installed for mypy to find frozen class init definitions
pip install attrs
mypy src/confluent_kafka
[testenv:black]
deps = black>=24.0.0
commands = black --check --diff .
[testenv:black-fix]
deps = black>=24.0.0
commands = black .
[testenv:isort]
deps = isort>=5.13.0
commands = isort --check-only --diff .
[testenv:isort-fix]
deps = isort>=5.13.0
commands = isort .
[pytest]
python_files = test_*
testpaths = tests
norecursedirs = tests/integration/*/java
[flake8]
exclude = venv*,.venv*,env,.env,.tox,.toxenv,.git,build,docs,tools,tmp-build,*_pb2.py,*tmp-KafkaCluster/*
max-line-length = 120
accept-encodings = utf-8
# E203: whitespace before ':' - conflicts with Black's formatting style
# W503: line break before binary operator - conflicts with Black's formatting style
ignore = E203, W503
per-file-ignores =
./src/confluent_kafka/schema_registry/_sync/avro.py: E303
./src/confluent_kafka/schema_registry/_sync/json_schema.py: E303
./src/confluent_kafka/schema_registry/_sync/protobuf.py: E303