mirror of https://github.com/astral-sh/ruff
Allow `ipytest` cell magic (#13745)
## Summary fixes: #13718 ## Test Plan Using the notebook as mentioned in https://github.com/astral-sh/ruff/issues/13718#issuecomment-2410631674, this PR does not give the "F821 Undefined name `test_sorted`" diagnostic.
This commit is contained in:
parent
814ab47582
commit
5caabe54b6
|
|
@ -238,9 +238,19 @@ impl Cell {
|
||||||
//
|
//
|
||||||
// This is to avoid false positives when these variables are referenced
|
// This is to avoid false positives when these variables are referenced
|
||||||
// elsewhere in the notebook.
|
// elsewhere in the notebook.
|
||||||
|
//
|
||||||
|
// Refer https://github.com/astral-sh/ruff/issues/13718 for `ipytest`.
|
||||||
!matches!(
|
!matches!(
|
||||||
command,
|
command,
|
||||||
"capture" | "debug" | "prun" | "pypy" | "python" | "python3" | "time" | "timeit"
|
"capture"
|
||||||
|
| "debug"
|
||||||
|
| "ipytest"
|
||||||
|
| "prun"
|
||||||
|
| "pypy"
|
||||||
|
| "python"
|
||||||
|
| "python3"
|
||||||
|
| "time"
|
||||||
|
| "timeit"
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue