Plugins/CheckerPlugins/SyntaxChecker/SyntaxCheck.py

branch
BgService
changeset 3173
1fb284abe46e
parent 3159
02cb2adb4868
child 3177
5af61402d74d
equal deleted inserted replaced
3172:c0f78e9d0971 3173:1fb284abe46e
1 # -*- coding: utf-8 -*- 1 # -*- coding: utf-8 -*-
2 2
3 # Copyright (c) 2011 - 2013 Detlev Offenbach <detlev@die-offenbachs.de> 3 # Copyright (c) 2011 - 2013 Detlev Offenbach <detlev@die-offenbachs.de>
4 # 4 #
5 # pylint: disable=C0103
5 6
6 """ 7 """
7 Module implementing the syntax check for Python 2/3. 8 Module implementing the syntax check for Python 2/3.
8 """ 9 """
9 from __future__ import unicode_literals 10 from __future__ import unicode_literals
10 11
11 import re 12 import re
12 import sys 13 import sys
13 import traceback 14 import traceback
14 15
15 from .pyflakes.checker import Checker 16 try:
16 from .pyflakes.messages import ImportStarUsed 17 from pyflakes.checker import Checker
18 from pyflakes.messages import ImportStarUsed
19 except ImportError:
20 pass
21
22
23 def initService():
24 """
25 Initialize the service and return the entry point.
26
27 @return the entry point for the background client (function)
28 """
29 return syntaxAndPyflakesCheck
17 30
18 31
19 def normalizeCode(codestring): 32 def normalizeCode(codestring):
20 """ 33 """
21 Function to normalize the given code. 34 Function to normalize the given code.

eric ide

mercurial