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

Make Message Generic of result #513

Merged
merged 1 commit into from
Dec 3, 2022

Conversation

orsinium
Copy link
Contributor

  1. Turn Message from namedtuple into dataclass
  2. Make Message a Generic of the expected result. Now, if you do actor.send().get_result(), mypy will correctly infer the result type from the actor type annotation.

@Bogdanp Bogdanp merged commit 425ba43 into Bogdanp:master Dec 3, 2022
@Bogdanp
Copy link
Owner

Bogdanp commented Dec 3, 2022

Thanks!

@orsinium orsinium deleted the generic-message branch December 4, 2022 08:51
@anton-petrov
Copy link

It's a good idea to transform result message to generic. But, perhaps, because of these changes, part of the tests broke and need to be fixed.

@orsinium
Copy link
Contributor Author

orsinium commented Dec 8, 2022

Huh, there is no CI. Alrighty, I'll have a look 👌🏿

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.

3 participants