Why is ModbusTransactionManager not in transaction.__all__? #1437
-
I am writing some tests of a device I communicate with via I have one question and one request:
From PEP8, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
If you are testing your device, you should use e.g. client_calls and not patch anything. If you are simulating your device, I recommend using server/simulator. But anyhow if you patch comms at ModbusTransactionManager level, you patch internally in pymodbus and at that level we do not provide all (in some places you can still find it, because no code is perfect). We consider pymodbus one module, and thus all interfaces must have all to be pep8 compliant. Our internal structure is of course available in the source but it changes between version without notification. |
Beta Was this translation helpful? Give feedback.
-
I think I misread your suggestion. The all should be in init.py and nowhere else, and it is not logically to put it in the top, that is where we have imports etc. What is the reason you want to move it to the top ? I might have overlooked some good arguments. |
Beta Was this translation helpful? Give feedback.
If you are testing your device, you should use e.g. client_calls and not patch anything.
If you are simulating your device, I recommend using server/simulator.
But anyhow if you patch comms at ModbusTransactionManager level, you patch internally in pymodbus and at that level we do not provide all (in some places you can still find it, because no code is perfect).
We consider pymodbus one module, and thus all interfaces must have all to be pep8 compliant. Our internal structure is of course available in the source but it changes between version without notification.