-
Notifications
You must be signed in to change notification settings - Fork 949
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 ModbusClientMixin Generic to fix type issues for sync and async #1980
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A very elegant PR, I like it !!
I see that CI is failing with mypy complaining, please fix that, along with the couple of review comments I made.
@alexrudd2 Can you please have a look at this PR, from the typing perspective ? I see it as a very elegant solution to the problem at hand, but you know I am by far not the expert on mypy. |
Once you feel its ready to go, please re-request review. |
Sure, it may take me a few days though |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You clearly know more than me about Python types, and this is a good solution to a problem Jan and I wasted a lot of cycles on. Thank you.
Oh, if I had to guess you didn't find |
It is in README:
|
Let get this merged... @laundmo I look forward to see followup PR, you really did magic here ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks a lot.
The open comments are not urgent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to please ruff
this way, the concrete client can specify the generic response return type.
closes: #1973