mirror of
				https://github.com/astral-sh/ruff.git
				synced 2025-10-31 12:05:57 +00:00 
			
		
		
		
	|  5bfffe1aa7 
		
			Some checks are pending
		
		
	 CI / Determine changes (push) Waiting to run CI / cargo fmt (push) Waiting to run CI / cargo clippy (push) Blocked by required conditions CI / cargo test (linux) (push) Blocked by required conditions CI / cargo test (linux, release) (push) Blocked by required conditions CI / cargo test (windows) (push) Blocked by required conditions CI / cargo test (wasm) (push) Blocked by required conditions CI / cargo build (release) (push) Waiting to run CI / cargo build (msrv) (push) Blocked by required conditions CI / cargo fuzz build (push) Blocked by required conditions CI / fuzz parser (push) Blocked by required conditions CI / test scripts (push) Blocked by required conditions CI / ecosystem (push) Blocked by required conditions CI / Fuzz for new ty panics (push) Blocked by required conditions CI / cargo shear (push) Blocked by required conditions CI / python package (push) Waiting to run CI / pre-commit (push) Waiting to run CI / mkdocs (push) Waiting to run CI / formatter instabilities and black similarity (push) Blocked by required conditions CI / test ruff-lsp (push) Blocked by required conditions CI / check playground (push) Blocked by required conditions CI / benchmarks-instrumented (push) Blocked by required conditions CI / benchmarks-walltime (push) Blocked by required conditions [ty Playground] Release / publish (push) Waiting to run ## Summary
This PR remaps ranges in Jupyter notebooks from simple `row:column`
indices in the concatenated source code to `cell:row:col` to match
Ruff's output. This is probably not a likely change to land upstream in
`annotate-snippets`, but I didn't see a good way around it.
The remapping logic is taken nearly verbatim from here:
 | ||
|---|---|---|
| .. | ||
| examples | ||
| src | ||
| tests | ||
| Cargo.toml | ||
| LICENSE-APACHE | ||
| LICENSE-MIT | ||
| README.md | ||
This is a fork of the annotate-snippets crate. The principle motivation for
this fork, at the time of writing, is issue #167. Specifically, we wanted to
upgrade our version of annotate-snippets, but do so without changing our
diagnostic message format.
This copy of annotate-snippets is basically identical to upstream, but with
an extra Level::None variant that permits skipping over a new non-optional
header emitted by annotate-snippets.
More generally, it seems plausible that we may want to tweak other aspects of the output format in the future, so it might make sense to stick with our own copy so that we can be masters of our own destiny.