]>
crepu.dev Git - config.git/blob - djavu-asus/elpy/rpc-venv/lib/python3.11/site-packages/jedi/api/errors.py
2 This file is about errors in Python files and not about exception handling in
7 def parso_to_jedi_errors(grammar
, module_node
):
8 return [SyntaxError(e
) for e
in grammar
.iter_errors(module_node
)]
13 Syntax errors are generated by :meth:`.Script.get_syntax_errors`.
15 def __init__(self
, parso_error
):
16 self
._parso
_error
= parso_error
20 """The line where the error starts (starting with 1)."""
21 return self
._parso
_error
.start_pos
[0]
25 """The column where the error starts (starting with 0)."""
26 return self
._parso
_error
.start_pos
[1]
30 """The line where the error ends (starting with 1)."""
31 return self
._parso
_error
.end_pos
[0]
34 def until_column(self
):
35 """The column where the error ends (starting with 0)."""
36 return self
._parso
_error
.end_pos
[1]
38 def get_message(self
):
39 return self
._parso
_error
.message
42 return '<%s from=%s to=%s>' % (
43 self
.__class
__.__name
__,
44 self
._parso
_error
.start_pos
,
45 self
._parso
_error
.end_pos
,