diff --git a/examples/client_async.py b/examples/client_async.py index 14a75eaa6..39067a3c7 100755 --- a/examples/client_async.py +++ b/examples/client_async.py @@ -34,7 +34,7 @@ try: - import helper # type: ignore[import-not-found] + from examples import helper except ImportError: print("*** ERROR --> THIS EXAMPLE needs the example directory, please see \n\ https://pymodbus.readthedocs.io/en/latest/source/examples.html\n\ diff --git a/examples/client_async_calls.py b/examples/client_async_calls.py index 5f5ac87b7..22b439b94 100755 --- a/examples/client_async_calls.py +++ b/examples/client_async_calls.py @@ -38,7 +38,7 @@ try: - import client_async # type: ignore[import-not-found] + from examples import client_async except ImportError: print("*** ERROR --> THIS EXAMPLE needs the example directory, please see \n\ https://pymodbus.readthedocs.io/en/latest/source/examples.html\n\ diff --git a/examples/client_calls.py b/examples/client_calls.py index 5fa16b4a6..0cb4dcca0 100755 --- a/examples/client_calls.py +++ b/examples/client_calls.py @@ -36,7 +36,7 @@ try: - import client_sync # type: ignore[import-not-found] + from examples import client_sync except ImportError: print("*** ERROR --> THIS EXAMPLE needs the example directory, please see \n\ https://pymodbus.readthedocs.io/en/latest/source/examples.html\n\ diff --git a/examples/client_payload.py b/examples/client_payload.py index 83e75526b..1dfb0fbb7 100755 --- a/examples/client_payload.py +++ b/examples/client_payload.py @@ -12,7 +12,7 @@ try: - import client_async # type: ignore[import-not-found] + from examples import client_async except ImportError: print("*** ERROR --> THIS EXAMPLE needs the example directory, please see \n\ https://pymodbus.readthedocs.io/en/latest/source/examples.html\n\ diff --git a/examples/client_sync.py b/examples/client_sync.py index 381461745..0f04eda39 100755 --- a/examples/client_sync.py +++ b/examples/client_sync.py @@ -37,7 +37,7 @@ try: - import helper # type: ignore[import-not-found] + from examples import helper except ImportError: print("*** ERROR --> THIS EXAMPLE needs the example directory, please see \n\ https://pymodbus.readthedocs.io/en/latest/source/examples.html\n\ diff --git a/examples/modbus_forwarder.py b/examples/modbus_forwarder.py index 7933f1bb3..6c3338f7f 100755 --- a/examples/modbus_forwarder.py +++ b/examples/modbus_forwarder.py @@ -24,7 +24,7 @@ try: - import helper # type: ignore[import-not-found] + from examples import helper except ImportError: print("*** ERROR --> THIS EXAMPLE needs the example directory, please see \n\ https://pymodbus.readthedocs.io/en/latest/source/examples.html\n\ diff --git a/examples/py.typed b/examples/py.typed deleted file mode 100644 index e69de29bb..000000000 diff --git a/examples/server_async.py b/examples/server_async.py index 86166341d..73c20b748 100755 --- a/examples/server_async.py +++ b/examples/server_async.py @@ -40,7 +40,7 @@ try: - import helper # type: ignore[import-not-found] + from examples import helper except ImportError: print("*** ERROR --> THIS EXAMPLE needs the example directory, please see \n\ https://pymodbus.readthedocs.io/en/latest/source/examples.html\n\ diff --git a/examples/server_callback.py b/examples/server_callback.py index 878f07ec3..e80c6d1c1 100755 --- a/examples/server_callback.py +++ b/examples/server_callback.py @@ -10,7 +10,7 @@ try: - import server_async # type: ignore[import-not-found] + from examples import server_async except ImportError: print("*** ERROR --> THIS EXAMPLE needs the example directory, please see \n\ https://pymodbus.readthedocs.io/en/latest/source/examples.html\n\ diff --git a/examples/server_payload.py b/examples/server_payload.py index 19b7fa4b9..6da3da04f 100755 --- a/examples/server_payload.py +++ b/examples/server_payload.py @@ -10,7 +10,7 @@ try: - import server_async # type: ignore[import-not-found] + from examples import server_async except ImportError: print("*** ERROR --> THIS EXAMPLE needs the example directory, please see \n\ https://pymodbus.readthedocs.io/en/latest/source/examples.html\n\ diff --git a/examples/server_sync.py b/examples/server_sync.py index 871acd5f6..57f8177ea 100755 --- a/examples/server_sync.py +++ b/examples/server_sync.py @@ -39,8 +39,7 @@ try: - import helper # type: ignore[import-not-found] - import server_async # type: ignore[import-not-found] + from examples import helper, server_async except ImportError: print("*** ERROR --> THIS EXAMPLE needs the example directory, please see \n\ https://pymodbus.readthedocs.io/en/latest/source/examples.html\n\ diff --git a/examples/server_updating.py b/examples/server_updating.py index 4dee58cf1..b97fe34f2 100755 --- a/examples/server_updating.py +++ b/examples/server_updating.py @@ -37,7 +37,7 @@ try: - import server_async # type: ignore[import-not-found] + from examples import server_async except ImportError: print("*** ERROR --> THIS EXAMPLE needs the example directory, please see \n\ https://pymodbus.readthedocs.io/en/latest/source/examples.html\n\