1
0
forked from VimPlug/jedi

Better SyntaxError listings

This commit is contained in:
Dave Halter
2020-03-14 17:30:33 +01:00
parent 3cef022a15
commit 20fad922bc
3 changed files with 11 additions and 1 deletions

View File

@@ -14,18 +14,22 @@ class SyntaxError(object):
@property
def line(self):
"""The line where the error starts (starting with 1)."""
return self._parso_error.start_pos[0]
@property
def column(self):
"""The column where the error starts (starting with 0)."""
return self._parso_error.start_pos[1]
@property
def until_line(self):
"""The line where the error ends (starting with 1)."""
return self._parso_error.end_pos[0]
@property
def until_column(self):
"""The column where the error ends (starting with 0)."""
return self._parso_error.end_pos[1]
def __repr__(self):