-
-
Notifications
You must be signed in to change notification settings - Fork 348
Open
Description
Checklist
- Does your title concisely summarize the problem?
- Did you include a minimal, reproducible example?
- What OS are you using?
- What version of Python are you using?
- What version of Dramatiq are you using?
- What Broker are you using?
- What did you do?
- What did you expect would happen?
- What happened?
What OS are you using?
Ubuntu 24.04
What version of Python are you using?
Python 3.12.7
What version of Dramatiq are you using?
2.0.0 (current master)
What Broker are you using?
Irrelevant for this issue
What did you do?
Tried do use mypy (version 1.18.2) with async actors. A minimal example:
import dramatiq
@dramatiq.actor
async def foo() -> None:
pass
@dramatiq.actor()
async def bar() -> None:
passWhat did you expect would happen?
I expected no errors from mypy.
What happened?
dramatiq/test.py:3:2: error: Argument 1 to "actor" has incompatible type
"Callable[[], Coroutine[Any, Any, None]]"; expected
"Callable[[], Awaitable[Never]]" [arg-type]
@dramatiq.actor
^
dramatiq/test.py:8:2: error: Argument 1 has incompatible type
"Callable[[], Coroutine[Any, Any, None]]"; expected
"Callable[[], Awaitable[Never]]" [arg-type]
@dramatiq.actor()
^
Metadata
Metadata
Assignees
Labels
No labels