Closed alexrudd2 closed 3 months ago
The ascii_framer is not being removed.
Be very careful when you rework transaction, it has a lot of strange (but needed) code....and it seems I cut a little bit to deep, when removing a function in rtu_framer.
The request/response classes surely needs a refactoring, but that is not on my short list.
The ascii_framer is not being removed.
I meant the type error (which is now already gone).
Be very careful when you rework transaction, it has a lot of strange (but needed) code....and it seems I cut a little bit to deep, when removing a function in rtu_framer.
Yeah, your fixing the code satisfied mypy
. I do not intend to do further changes right now. My goal of --no-untyped-defs
is achieved with this PR.
The request/response classes surely needs a refactoring, but that is not on my short list.
I believe this is already mentioned in https://github.com/pymodbus-dev/pymodbus/issues/1034
No #1034 is specifically about DIAG, my comment was about all the request/response classes.
I am f.x. convinced it would make the code simpler not to have separate a request and response class for each function code, but as wrote that is for later...right now my focus is the message layer, which is to followed by a new transaction layer with proper locking.
@laundmo has the typing situation improved for you with these recent changes?
For me all the mypy
errors are cleared, and about 50% of the pyright
ones.
When I started, there were over >150
mypy
errors in untyped definitions. They have all been slowly solved.Remaining ignores:
diag_message
,pyright
is smart enough to inferint
, butmypy
is not. Actually, this code has a lot of type problems and needs a closer lookascii_framer
is going to be deleted soon. (See https://github.com/pymodbus-dev/pymodbus/pull/2086)transaction
code also has messy types but is being reworked