Conversation
|
The typing hints are useful, but I see no reason to have separate single and multiple methods. It's a breaking change to replace an overloaded parameter that's only used within the update method, and assert the response length matches the request length. As far as I'm aware the modbus library should already error at register bounds or fill in missing data It's been awhile since I made this, but I don't believe getters and setter properties support parameters to overload the cache state from update. |
Okay, well, then I will make this 100% interface compatible and distinguish between the types inside the read/write method's implementation if necessary.
The idea is to replace only the get_/set_ methods with getters/setters properties. This is more syntactic sugar than an actual change in the implementation. The |
bb77b51 to
f45ee21
Compare
First of all: thanks for this package. It really saved me some time. 👍
I fixed the typing hints according to the error messages displayed by pyright.
If you want, we could also change all
set_*andget_*methods to@propertyand@property.setterto make it a bit more pythonic. But this, I would do in a separate PR.