src/eric7/Plugins/CheckerPlugins/SyntaxChecker/SyntaxCheck.py

branch
eric7
changeset 9482
a2bc06a54d9d
parent 9473
3f23dbf37dbe
child 9507
1f39839655ea
equal deleted inserted replaced
9481:0b936ff1bbb9 9482:a2bc06a54d9d
6 """ 6 """
7 Module implementing the syntax check for Python 3. 7 Module implementing the syntax check for Python 3.
8 """ 8 """
9 9
10 import ast 10 import ast
11 import builtins
11 import contextlib 12 import contextlib
12 import multiprocessing 13 import multiprocessing
13 import queue 14 import queue
14 import re 15 import re
15 import traceback 16 import traceback
230 hold a list containing details about the error/ warnings 231 hold a list containing details about the error/ warnings
231 (file name, line number, column, codestring (only at syntax 232 (file name, line number, column, codestring (only at syntax
232 errors), the message, a list with arguments for the message) 233 errors), the message, a list with arguments for the message)
233 @rtype dict 234 @rtype dict
234 """ 235 """
235 import builtins
236
237 try: 236 try:
238 codestring = normalizeCode(codestring) 237 codestring = normalizeCode(codestring)
239 238
240 # Check for VCS conflict markers 239 # Check for VCS conflict markers
241 for conflictMarkerRe in VcsConflictMarkerRegExpList: 240 for conflictMarkerRe in VcsConflictMarkerRegExpList:
247 {"error": (filename, lineindex, 0, "", "VCS conflict marker found")} 246 {"error": (filename, lineindex, 0, "", "VCS conflict marker found")}
248 ] 247 ]
249 248
250 if filename.endswith(".ptl"): 249 if filename.endswith(".ptl"):
251 try: 250 try:
252 import quixote.ptl_compile 251 import quixote.ptl_compile # __IGNORE_WARNING_I10__
253 except ImportError: 252 except ImportError:
254 return [{"error": (filename, 0, 0, "", "Quixote plugin not found.")}] 253 return [{"error": (filename, 0, 0, "", "Quixote plugin not found.")}]
255 template = quixote.ptl_compile.Template(codestring, filename) 254 template = quixote.ptl_compile.Template(codestring, filename)
256 template.compile() 255 template.compile()
257 else: 256 else:

eric ide

mercurial