-
Notifications
You must be signed in to change notification settings - Fork 933
Add mypy type checking to CI/CD #2123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,7 @@ | ||
| include README.md | ||
| include LICENSE | ||
| include src/confluent_kafka/src/*.[ch] | ||
| include src/confluent_kafka/py.typed | ||
| include src/confluent_kafka/cimpl.pyi | ||
| prune tests | ||
| prune docs | ||
| prune docs |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,7 @@ urllib3<3 | |
| flake8 | ||
| mypy | ||
| types-cachetools | ||
| types-requests | ||
| orjson | ||
| pytest | ||
| pytest-timeout | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,5 +1,5 @@ | ||||||
| [tox] | ||||||
| envlist = flake8,py37,py38,py39,py310,py311,py312,py313 | ||||||
| envlist = flake8,mypy,py37,py38,py39,py310,py311,py312,py313 | ||||||
|
|
||||||
| [testenv] | ||||||
| passenv = | ||||||
|
|
@@ -20,6 +20,13 @@ commands = | |||||
| deps = flake8 | ||||||
| commands = flake8 | ||||||
|
|
||||||
| [testenv:mypy] | ||||||
| deps = | ||||||
| mypy | ||||||
| types-cachetools | ||||||
| types-requests | ||||||
| commands = mypy src/confluent_kafka | ||||||
|
||||||
| commands = mypy src/confluent_kafka | |
| commands = mypy --strict src/confluent_kafka |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already have config in pyproject.toml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The mypy invocation should match the configuration used in tox.ini. Consider using
tox -e mypyinstead of calling mypy directly to ensure consistency between local development and CI environments.