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: mypy error Missing named argument "reply_to" for "publish" of "LogicPublisher" #1792

Closed
Klavionik opened this issue Sep 14, 2024 · 0 comments · Fixed by #1795
Closed
Labels
bug Something isn't working

Comments

@Klavionik
Copy link

Describe the bug
Since faststream 0.5.19 mypy compains about Missing named argument "reply_to" for "publish" of "LogicPublisher", but it seems like this argument isn't actually required to publish a message.

How to reproduce

from faststream import FastStream
from faststream.rabbit import RabbitBroker

broker = RabbitBroker("amqp://localhost:5672/")
app = FastStream(broker)

publisher = broker.publisher("test")


@broker.subscriber("test")
async def handle() -> None:
    await publisher.publish("message")

Run mypy on the code above on faststream >= 0.5.19 and you'll see the error.

Expected behavior
I expect to see no error.

Observed behavior
The mypy error is present even though the reply_to argument is not required at runtime.

Environment
Running FastStream 0.5.19 with CPython 3.11.5 on Windows

@Klavionik Klavionik added the bug Something isn't working label Sep 14, 2024
github-merge-queue bot pushed a commit that referenced this issue Sep 16, 2024
* fix (#1792): make RMQ publisher.publish reply_to optional

* lint: fix mypy
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
None yet
Development

Successfully merging a pull request may close this issue.

1 participant