Skip to content

Conversation

@janek-cosmose
Copy link
Contributor

No description provided.

@janek-cosmose
Copy link
Contributor Author

Fixes #795

@janek-cosmose
Copy link
Contributor Author

Tested with mypy 1.8.2 on dramatiq project and on sample file:

import dramatiq


@dramatiq.actor
async def foo() -> None:
    pass


@dramatiq.actor()
async def foo1() -> None:
    pass


@dramatiq.actor
def foo2() -> None:
    pass


@dramatiq.actor()
def foo3() -> None:
    pass

@LincolnPuzey
Copy link
Collaborator

@janek-cosmose Thanks for the PR! Looks good to me.

Can you add yourself to CONTRIBUTORS.md, and also add E704 to the ignored errors in .flake8 since it is conflicting with black.

Then I think we can merge

@LincolnPuzey LincolnPuzey linked an issue Dec 1, 2025 that may be closed by this pull request
9 tasks
@LincolnPuzey LincolnPuzey changed the title Fix #795: Incorrect typing with async decorators Fix #795: Fix typing of actor decorator to work with async actors Dec 1, 2025
@LincolnPuzey LincolnPuzey merged commit 6f84cdb into Bogdanp:master Dec 1, 2025
11 checks passed
@LincolnPuzey LincolnPuzey added this to the v2.0.1 milestone Jan 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect typing for async actors

2 participants