ruff/crates/ruff
Micha Reiser 087d92cbf4
Formatter: Fix syntax error location in notebooks (#16499)
## Summary

Fixes https://github.com/astral-sh/ruff/issues/16476
fixes: #11453

We format notebooks cell by cell. That means, that offsets in parse
errors are relative
to the cell and not the entire document. We didn't account for this fact
when emitting syntax errors for notebooks in the formatter. 

This PR ensures that we correctly offset parse errors by the cell
location.

## Test Plan

Added test (it panicked before)
2025-03-04 18:00:31 +01:00
..
resources/test/fixtures Rename `ruff_cli` crate to `ruff` (#9557) 2024-01-16 17:47:01 -05:00
src Formatter: Fix syntax error location in notebooks (#16499) 2025-03-04 18:00:31 +01:00
tests Formatter: Fix syntax error location in notebooks (#16499) 2025-03-04 18:00:31 +01:00
Cargo.toml Formatter: Fix syntax error location in notebooks (#16499) 2025-03-04 18:00:31 +01:00
build.rs ruff: add worktree support to build.rs (#14896) 2024-12-10 14:06:59 -05:00