mirror of https://github.com/astral-sh/ruff
Revert change to notebook cell iteration
This commit is contained in:
parent
7c05fb5d66
commit
87def58605
|
|
@ -286,10 +286,9 @@ pub(crate) fn lint_path(
|
||||||
// mutated it.
|
// mutated it.
|
||||||
let src_notebook = source_kind.as_ipy_notebook().unwrap();
|
let src_notebook = source_kind.as_ipy_notebook().unwrap();
|
||||||
let mut stdout = io::stdout().lock();
|
let mut stdout = io::stdout().lock();
|
||||||
for ((idx, src_cell), dest_cell) in src_notebook
|
// Cell indices are 1-based.
|
||||||
.cells()
|
for ((idx, src_cell), dest_cell) in (1u32..)
|
||||||
.iter()
|
.zip(src_notebook.cells().iter())
|
||||||
.enumerate()
|
|
||||||
.zip(dest_notebook.cells().iter())
|
.zip(dest_notebook.cells().iter())
|
||||||
{
|
{
|
||||||
let (Cell::Code(src_code_cell), Cell::Code(dest_code_cell)) =
|
let (Cell::Code(src_code_cell), Cell::Code(dest_code_cell)) =
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue