Prevent PLCObject to be imported from IDE as a side effect of importing runtime package
authorEdouard Tisserant
Tue, 30 Oct 2018 13:47:24 +0100
changeset 2327 569d7fbc0bd4
parent 2326 d42ae2877b6e
child 2328 7eb6cb70bf5b
Prevent PLCObject to be imported from IDE as a side effect of importing runtime package
runtime/__init__.py
--- a/runtime/__init__.py	Tue Oct 30 09:46:46 2018 +0100
+++ b/runtime/__init__.py	Tue Oct 30 13:47:24 2018 +0100
@@ -9,9 +9,6 @@
 from runtime.Worker import worker
 MainWorker = worker()
 
-from runtime.PLCObject import PLCObject  # noqa # pylint: disable=wrong-import-position
-
-
 _PLCObjectSingleton = None
 
 
@@ -31,4 +28,5 @@
 
 def CreatePLCObjectSingleton(*args, **kwargs):
     global _PLCObjectSingleton
+    from runtime.PLCObject import PLCObject  # noqa # pylint: disable=wrong-import-position
     _PLCObjectSingleton = PLCObject(*args, **kwargs)