Skip to content

Make Message Generic of result - #513

Merged
Bogdanp merged 1 commit into
Bogdanp:masterfrom
orsinium-forks:generic-message
Dec 3, 2022
Merged

Make Message Generic of result#513
Bogdanp merged 1 commit into
Bogdanp:masterfrom
orsinium-forks:generic-message

Conversation

@orsinium

Copy link
Copy Markdown
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

Bogdanp commented Dec 3, 2022

Copy link
Copy Markdown
Owner

Thanks!

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

Copy link
Copy Markdown

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

orsinium commented Dec 8, 2022

Copy link
Copy Markdown
Contributor Author

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