You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While #15359 fixed a ton of bugs with our diagnostic rendering, it did introduce one regression related to parser diagnostics. Specifically, prior to #15359, we would get the following diagnostic in one case of a syntax error:
But I think it would probably be better to fix the renderer itself so that it points to the beginning of the following line automatically.
See #15509 which is related to this issue. These issues are technically separate since this one could be fixed independently of #15509. But if #15509 is fixed, then I think this one will automatically resolve itself as well.
The text was updated successfully, but these errors were encountered:
While #15359 fixed a ton of bugs with our diagnostic rendering, it did introduce one regression related to parser diagnostics. Specifically, prior to #15359, we would get the following diagnostic in one case of a syntax error:
(This is from
crates/ruff_python_parser/tests/snapshots/invalid_syntax@try_stmt_misspelled_except.py.snap
.)Now, the
^
is missing from the above. After #15359, the caret is added, but the diagnostic is now pointing at the end of the preceding line:We might be able to fix this by tweaking the ranges emitted by the parser when creating a diagnostic:
ruff/crates/ruff_python_parser/src/parser/mod.rs
Lines 489 to 492 in 96da136
But I think it would probably be better to fix the renderer itself so that it points to the beginning of the following line automatically.
See #15509 which is related to this issue. These issues are technically separate since this one could be fixed independently of #15509. But if #15509 is fixed, then I think this one will automatically resolve itself as well.
The text was updated successfully, but these errors were encountered: