Skip to content

Commit

Permalink
Import examples direct. (#2442)
Browse files Browse the repository at this point in the history
  • Loading branch information
janiversen authored Nov 6, 2024
1 parent d0cc7cc commit d137c6e
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion examples/client_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@


try:
from examples import helper
import helper # type: ignore[import-not-found]
except ImportError:
print("*** ERROR --> THIS EXAMPLE needs the example directory, please see \n\
https://pymodbus.readthedocs.io/en/latest/source/examples.html\n\
Expand Down
2 changes: 1 addition & 1 deletion examples/client_async_calls.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@


try:
from examples import client_async
import client_async # type: ignore[import-not-found]
except ImportError:
print("*** ERROR --> THIS EXAMPLE needs the example directory, please see \n\
https://pymodbus.readthedocs.io/en/latest/source/examples.html\n\
Expand Down
2 changes: 1 addition & 1 deletion examples/client_calls.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@


try:
from examples import client_sync
import client_sync # type: ignore[import-not-found]
except ImportError:
print("*** ERROR --> THIS EXAMPLE needs the example directory, please see \n\
https://pymodbus.readthedocs.io/en/latest/source/examples.html\n\
Expand Down
2 changes: 1 addition & 1 deletion examples/client_payload.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@


try:
from examples import client_async
import client_async # type: ignore[import-not-found]
except ImportError:
print("*** ERROR --> THIS EXAMPLE needs the example directory, please see \n\
https://pymodbus.readthedocs.io/en/latest/source/examples.html\n\
Expand Down
2 changes: 1 addition & 1 deletion examples/client_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@


try:
from examples import helper
import helper # type: ignore[import-not-found]
except ImportError:
print("*** ERROR --> THIS EXAMPLE needs the example directory, please see \n\
https://pymodbus.readthedocs.io/en/latest/source/examples.html\n\
Expand Down
2 changes: 1 addition & 1 deletion examples/modbus_forwarder.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@


try:
from examples import helper
import helper # type: ignore[import-not-found]
except ImportError:
print("*** ERROR --> THIS EXAMPLE needs the example directory, please see \n\
https://pymodbus.readthedocs.io/en/latest/source/examples.html\n\
Expand Down
Empty file added examples/py.typed
Empty file.
2 changes: 1 addition & 1 deletion examples/server_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@


try:
from examples import helper
import helper # type: ignore[import-not-found]
except ImportError:
print("*** ERROR --> THIS EXAMPLE needs the example directory, please see \n\
https://pymodbus.readthedocs.io/en/latest/source/examples.html\n\
Expand Down
2 changes: 1 addition & 1 deletion examples/server_callback.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


try:
from examples import server_async
import server_async # type: ignore[import-not-found]
except ImportError:
print("*** ERROR --> THIS EXAMPLE needs the example directory, please see \n\
https://pymodbus.readthedocs.io/en/latest/source/examples.html\n\
Expand Down
2 changes: 1 addition & 1 deletion examples/server_payload.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


try:
from examples import server_async
import server_async # type: ignore[import-not-found]
except ImportError:
print("*** ERROR --> THIS EXAMPLE needs the example directory, please see \n\
https://pymodbus.readthedocs.io/en/latest/source/examples.html\n\
Expand Down
3 changes: 2 additions & 1 deletion examples/server_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@


try:
from examples import helper, server_async
import helper # type: ignore[import-not-found]
import server_async # type: ignore[import-not-found]
except ImportError:
print("*** ERROR --> THIS EXAMPLE needs the example directory, please see \n\
https://pymodbus.readthedocs.io/en/latest/source/examples.html\n\
Expand Down
2 changes: 1 addition & 1 deletion examples/server_updating.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@


try:
from examples import server_async
import server_async # type: ignore[import-not-found]
except ImportError:
print("*** ERROR --> THIS EXAMPLE needs the example directory, please see \n\
https://pymodbus.readthedocs.io/en/latest/source/examples.html\n\
Expand Down

0 comments on commit d137c6e

Please sign in to comment.