secsgem icon indicating copy to clipboard operation
secsgem copied to clipboard

SV: Provide more concrete and correct return type annotations

Open twmr opened this issue 2 months ago • 1 comments

The return type annotations of the status variable related methods are wrong, because None can never be returned. I checked the return type annotation and the implementation of StreamFunctions.decode and figured out that this method never returns None. Therefore, also the status variable methods in secs/handler.py never return None.

Furthermore, concrete return types are preferred by the python community over generic ones. Therefore, SecsStreamFunction should not be used as a return type of the SV related methods.

This is all fixed in this commit.

This PR builds on top of #188

twmr avatar Dec 28 '24 22:12 twmr