mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 14:04:26 +08:00
Script: improve ValueError for column
Ref: https://github.com/davidhalter/jedi/issues/1168
This commit is contained in:
committed by
Dave Halter
parent
d06e55aab5
commit
f3c1f4c548
@@ -133,7 +133,9 @@ class Script(object):
|
|||||||
|
|
||||||
column = line_len if column is None else column
|
column = line_len if column is None else column
|
||||||
if not (0 <= column <= line_len):
|
if not (0 <= column <= line_len):
|
||||||
raise ValueError('`column` parameter is not in a valid range.')
|
raise ValueError('`column` parameter (%d) is not in a valid range '
|
||||||
|
'(0-%d) for line %d (%r).' % (
|
||||||
|
column, line_len, line, line_string))
|
||||||
self._pos = line, column
|
self._pos = line, column
|
||||||
self._path = path
|
self._path = path
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user