mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-29 21:35:58 +00:00
Add Jupyter Notebook document change snapshot test (#11944)
## Summary Closes #11914. This PR introduces a snapshot test that replays the LSP requests made during a document formatting request, and confirms that the notebook document is updated in the expected way.
This commit is contained in:
parent
927069c12f
commit
3ab7a8da73
13 changed files with 921 additions and 20 deletions
|
@ -8,7 +8,7 @@ mod text_document;
|
|||
use std::collections::HashMap;
|
||||
|
||||
use lsp_types::{PositionEncodingKind, Url};
|
||||
pub(crate) use notebook::NotebookDocument;
|
||||
pub use notebook::NotebookDocument;
|
||||
pub(crate) use range::{NotebookRange, RangeExt, ToRangeExt};
|
||||
pub(crate) use replacement::Replacement;
|
||||
pub(crate) use text_document::DocumentVersion;
|
||||
|
@ -34,7 +34,7 @@ pub enum PositionEncoding {
|
|||
/// A unique document ID, derived from a URL passed as part of an LSP request.
|
||||
/// This document ID can point to either be a standalone Python file, a full notebook, or a cell within a notebook.
|
||||
#[derive(Clone, Debug)]
|
||||
pub(crate) enum DocumentKey {
|
||||
pub enum DocumentKey {
|
||||
Notebook(Url),
|
||||
NotebookCell(Url),
|
||||
Text(Url),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue