Skip to content

chore(mypy): switch to pyproject.toml configuration #2233

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

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,5 @@ repos:
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.14.1
hooks:
- id: mypy
- id: mypy
pass_filenames: false
32 changes: 32 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,35 @@ omit = [
"*/pypy/*",
"*kombu/utils/debug.py",
]

[tool.mypy]
warn_unused_configs = true
strict = false
follow_imports = "skip"
show_error_codes = true
disallow_untyped_defs = true
ignore_missing_imports = true
files = [
'kombu/abstract.py',
'kombu/utils/debug.py',
'kombu/utils/time.py',
'kombu/utils/uuid.py',
't/unit/utils/test_uuid.py',
'kombu/utils/text.py',
'kombu/exceptions.py',
't/unit/test_exceptions.py',
'kombu/clocks.py',
't/unit/test_clocks.py',
'kombu/__init__.py',
'kombu/asynchronous/__init__.py',
'kombu/asynchronous/aws/__init__.py',
'kombu/asynchronous/aws/ext.py',
'kombu/asynchronous/aws/sqs/__init__.py',
'kombu/asynchronous/aws/sqs/ext.py',
'kombu/asynchronous/http/__init__.py',
'kombu/transport/__init__.py',
'kombu/transport/virtual/__init__.py',
'kombu/utils/__init__.py',
'kombu/matcher.py',
'kombu/asynchronous/semaphore.py',
]
32 changes: 0 additions & 32 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -42,38 +42,6 @@ per-file-ignores =
add_imports =
from __future__ import annotations

[mypy]
warn_unused_configs = True
strict = False
follow_imports = skip
show_error_codes = True
disallow_untyped_defs = True
ignore_missing_imports = True
files =
kombu/abstract.py,
kombu/utils/debug.py,
kombu/utils/time.py,
kombu/utils/uuid.py,
t/unit/utils/test_uuid.py,
kombu/utils/text.py,
kombu/exceptions.py,
t/unit/test_exceptions.py,
kombu/clocks.py,
t/unit/test_clocks.py,
kombu/__init__.py,
kombu/asynchronous/__init__.py,
kombu/asynchronous/aws/__init__.py,
kombu/asynchronous/aws/ext.py,
kombu/asynchronous/aws/sqs/__init__.py,
kombu/asynchronous/aws/sqs/ext.py,
kombu/asynchronous/http/__init__.py,
kombu/transport/__init__.py,
kombu/transport/virtual/__init__.py,
kombu/utils/__init__.py,
kombu/matcher.py,
kombu/asynchronous/semaphore.py


[pep257]
ignore = D102,D107,D104,D203,D105,D213,D401,D413,D417

Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ commands =
pydocstyle {toxinidir}/kombu

[testenv:mypy]
commands = python -m mypy --config-file setup.cfg
commands = python -m mypy
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no need to specify config-file CLI option as mypy automatically searches for configuration file.


[testenv:lint]
allowlist_externals = pre-commit
Expand Down