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

branch
eric7
changeset 10670
bfa05f79d932
parent 10439
21c28b0f9e41
child 10690
fab36645aa7d
equal deleted inserted replaced
10669:456bbea5f146 10670:bfa05f79d932
312 ) 312 )
313 if match is not None: 313 if match is not None:
314 fn, line = match.group(1, 2) 314 fn, line = match.group(1, 2)
315 if lines[1].startswith("SyntaxError:"): 315 if lines[1].startswith("SyntaxError:"):
316 error = re.match("SyntaxError: (.+)", lines[1]).group(1) 316 error = re.match("SyntaxError: (.+)", lines[1]).group(1)
317 elif lines[1].startswith("IndentationError:"):
318 error = re.match("IndentationError: (.+)", lines[1]).group(1)
319 elif lines[1].startswith("TabError:"):
320 error = re.match("TabError: (.+)", lines[1]).group(1)
317 else: 321 else:
318 code = re.match("(.+)", lines[1]).group(1) 322 code = re.match("(.+)", lines[1]).group(1)
319 for seLine in lines[2:]: 323 for seLine in lines[2:]:
320 if seLine.startswith("SyntaxError:"): 324 if seLine.startswith("SyntaxError:"):
321 error = re.match("SyntaxError: (.+)", seLine).group(1) 325 error = re.match("SyntaxError: (.+)", seLine).group(1)
326 elif seLine.startswith("IndentationError:"):
327 error = re.match("IndentationError: (.+)", seLine).group(1)
328 elif seLine.startswith("TabError:"):
329 error = re.match("TabError: (.+)", seLine).group(1)
322 elif seLine.rstrip().endswith("^"): 330 elif seLine.rstrip().endswith("^"):
323 index = len(seLine.rstrip()) - 4 331 index = len(seLine.rstrip()) - 4
324 else: 332 else:
325 fn = detail.filename 333 fn = detail.filename
326 line = detail.lineno or 1 334 line = detail.lineno or 1

eric ide

mercurial