Skip to content

Commit 1de7a00

Browse files
committed
ci
1 parent 36a9e6c commit 1de7a00

File tree

4 files changed

+20
-2
lines changed

4 files changed

+20
-2
lines changed

MANIFEST.in

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
include README.md
22
include LICENSE
33
include src/confluent_kafka/src/*.[ch]
4+
include src/confluent_kafka/py.typed
5+
include src/confluent_kafka/cimpl.pyi
46
prune tests
5-
prune docs
7+
prune docs

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ all:
22
@echo "Targets:"
33
@echo " clean"
44
@echo " docs"
5+
@echo " mypy"
6+
@echo " style-check"
7+
@echo " style-fix"
58

69

710
clean:
@@ -14,6 +17,9 @@ clean:
1417
docs:
1518
$(MAKE) -C docs html
1619

20+
mypy:
21+
python3 -m mypy src/confluent_kafka
22+
1723
style-check:
1824
@(tools/style-format.sh \
1925
$$(git ls-tree -r --name-only HEAD | egrep '\.(c|h|py)$$') )

tools/source-package-verification.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ if [[ $OS_NAME == linux && $ARCH == x64 ]]; then
5151
# Run these actions and tests only in this case
5252
echo "Building documentation ..."
5353
flake8 --exclude ./_venv,*_pb2.py,./build
54+
55+
echo "Running mypy type checking ..."
56+
mypy src/confluent_kafka
57+
5458
pip install -r requirements/requirements-docs.txt
5559
make docs
5660

tox.ini

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = flake8,py37,py38,py39,py310,py311,py312,py313
2+
envlist = flake8,mypy,py37,py38,py39,py310,py311,py312,py313
33

44
[testenv]
55
passenv =
@@ -20,6 +20,12 @@ commands =
2020
deps = flake8
2121
commands = flake8
2222

23+
[testenv:mypy]
24+
deps =
25+
mypy
26+
types-cachetools
27+
commands = mypy src/confluent_kafka
28+
2329
[pytest]
2430
python_files = test_*
2531
testpaths = tests

0 commit comments

Comments
 (0)