Closed alexrudd2 closed 4 months ago
I do wonder why it does not complain on line 225-229, it is exactly the same issue (recv returns bytes)...that just goes to show how (sorry for the expression) how incompetent and dangerous these checkers can be :-)
Actually, the situation is more complicated :)
https://github.com/pymodbus-dev/pymodbus/blob/a152762c247301152051bfad59dd2ab0ffab781c/pymodbus/client/base.py#L401-L406 does not seem correct.
If I keep adding type hints (mostly bytes
), the type checkers eventually find this:
https://github.com/pymodbus-dev/pymodbus/blob/a152762c247301152051bfad59dd2ab0ffab781c/pymodbus/client/serial.py#L230-L232
Quite similar to https://github.com/pymodbus-dev/pymodbus/pull/2031, but I do not see the full picture yet. Hence not (yet) annotating recv()
.
The recv() is an old relict, which I thought was removed long time ago....the very old code v2x had that for testing reasons I think.
The _in_waiting() looks OK to me, but it the linters do not agree......
Down to 58!
Solve another
9
errors withmypy --check-untyped-defs