More pylint+pep8 conformance
authorEdouard Tisserant
Wed, 08 Aug 2018 10:17:19 +0200
changeset 2249 602fdd08dfab
parent 2248 d9353e440887
child 2250 86f61c4dfe76
More pylint+pep8 conformance
Beremiz_service.py
editors/CodeFileEditor.py
--- a/Beremiz_service.py	Wed Aug 08 10:15:51 2018 +0200
+++ b/Beremiz_service.py	Wed Aug 08 10:17:19 2018 +0200
@@ -30,7 +30,7 @@
 import sys
 import getopt
 import threading
-from threading import Thread, currentThread, Semaphore, Lock
+from threading import Thread, Semaphore, Lock
 import traceback
 import __builtin__
 import Pyro
@@ -499,6 +499,7 @@
 
 if havewx:
     wx_eval_lock = Semaphore(0)
+    # FIXME : beware wx mainloop is _not_ running in main thread
     # main_thread = currentThread()
 
     def statuschangeTskBar(status):
@@ -512,6 +513,7 @@
         wx_eval_lock.release()
 
     def evaluator(tocall, *args, **kwargs):
+        # FIXME : should implement anti-deadlock
         # if main_thread == currentThread():
         #     # avoid dead lock if called from the wx mainloop
         #     return default_evaluator(tocall, *args, **kwargs)
--- a/editors/CodeFileEditor.py	Wed Aug 08 10:15:51 2018 +0200
+++ b/editors/CodeFileEditor.py	Wed Aug 08 10:17:19 2018 +0200
@@ -602,6 +602,7 @@
     def __init__(self, table, row, col):
         wx.grid.GridCellTextEditor.__init__(self)
 
+
 class ClassGridCellEditor(wx.grid.GridCellChoiceEditor):
     def __init__(self, table, row, col):
         wx.grid.GridCellChoiceEditor.__init__(self)
@@ -610,9 +611,9 @@
 
 class VariablesTable(CustomTable):
     __defaultColumnType = dict(
-            [(name, AllGridCellEditor) for name in
-             ["Name", "Initial", "Description", "OnChange", "Options"]] +
-            [('Class', ClassGridCellEditor), ('Type', None)])
+        [(name, AllGridCellEditor) for name in
+         ["Name", "Initial", "Description", "OnChange", "Options"]] +
+        [('Class', ClassGridCellEditor), ('Type', None)])
 
     def __init__(self, *args, **kwargs):
         my_columns = kwargs.pop("additional_columns")