Skip to content
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

Bug: the type for the new subscriber method parameter is not typed. #2060

Open
powersemmi opened this issue Feb 4, 2025 · 0 comments
Open
Labels
bug Something isn't working

Comments

@powersemmi
Copy link

Describe the bug
mypy indicates that it cannot find overloads with the new max_workers parameter.

How to reproduce
Include source code:

import logging
from typing import Annotated, Any

from fast_depends import Depends

from .brokers import broker

logger = logging.getLogger(__name__)


@broker.subscriber(
    'sample',
    group_id='sample',
    max_workers=config.SEARCH_QUERY_BATCH,
)
async def sample(task: dict[Any, Any]) -> None:
    pass

And/Or steps to reproduce the behavior:

  1. pip install mypy
  2. mypy .

Expected behavior
mypy will be successful

Observed behavior
mypy finds a typing error

Screenshots

Image

Environment
Running FastStream 0.5.34 with CPython 3.11.11 on Linux

Additional context

my mypy config

[tool.mypy]
plugins = ["pydantic.mypy"]
ignore_missing_imports = true
strict_optional = true
no_implicit_optional = true
disallow_any_generics = true
disallow_untyped_defs = true
strict_equality = true
warn_unreachable = true
warn_no_return = true
warn_unused_ignores = true
warn_redundant_casts = true
warn_unused_configs = true
exclude = ["venv", "scripts", "tmp"]
@powersemmi powersemmi added the bug Something isn't working label Feb 4, 2025
Flosckow pushed a commit to Flosckow/faststream that referenced this issue Feb 6, 2025
github-merge-queue bot pushed a commit that referenced this issue Feb 10, 2025
Co-authored-by: Daniil Dumchenko <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: No status
Development

No branches or pull requests

1 participant