Plugins/CheckerPlugins/SyntaxChecker/SyntaxCheck.py

branch
BgService
changeset 3173
1fb284abe46e
parent 3159
02cb2adb4868
child 3177
5af61402d74d
diff -r c0f78e9d0971 -r 1fb284abe46e Plugins/CheckerPlugins/SyntaxChecker/SyntaxCheck.py
--- a/Plugins/CheckerPlugins/SyntaxChecker/SyntaxCheck.py	Wed Jan 01 22:59:10 2014 +0100
+++ b/Plugins/CheckerPlugins/SyntaxChecker/SyntaxCheck.py	Sat Jan 04 22:12:42 2014 +0100
@@ -2,6 +2,7 @@
 
 # Copyright (c) 2011 - 2013 Detlev Offenbach <detlev@die-offenbachs.de>
 #
+# pylint: disable=C0103
 
 """
 Module implementing the syntax check for Python 2/3.
@@ -12,8 +13,20 @@
 import sys
 import traceback
 
-from .pyflakes.checker import Checker
-from .pyflakes.messages import ImportStarUsed
+try:
+    from pyflakes.checker import Checker
+    from pyflakes.messages import ImportStarUsed
+except ImportError:
+    pass
+
+
+def initService():
+    """
+    Initialize the service and return the entry point.
+    
+    @return the entry point for the background client (function)
+    """
+    return syntaxAndPyflakesCheck
 
 
 def normalizeCode(codestring):

eric ide

mercurial