mirror of
https://github.com/davidhalter/parso.git
synced 2025-12-10 14:41:58 +08:00
Add parso version to an exception
This commit is contained in:
@@ -165,9 +165,11 @@ class DiffParser(object):
|
|||||||
if last_pos != line_length:
|
if last_pos != line_length:
|
||||||
current_lines = split_lines(self._module.get_code(), keepends=True)
|
current_lines = split_lines(self._module.get_code(), keepends=True)
|
||||||
diff = difflib.unified_diff(current_lines, new_lines)
|
diff = difflib.unified_diff(current_lines, new_lines)
|
||||||
|
import parso
|
||||||
raise Exception(
|
raise Exception(
|
||||||
"There's an issue (%s != %s) with the diff parser. Please report:\n%s"
|
"There's an issue (%s != %s) with the diff parser. Please "
|
||||||
% (last_pos, line_length, ''.join(diff))
|
"report (parso v%s):\n%s"
|
||||||
|
% (last_pos, line_length, parso.__version__, ''.join(diff))
|
||||||
)
|
)
|
||||||
|
|
||||||
LOG.debug('diff parser end')
|
LOG.debug('diff parser end')
|
||||||
|
|||||||
Reference in New Issue
Block a user