mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-26 11:59:35 +00:00
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
1 changed files with 11 additions and 1 deletions
|
@ -238,9 +238,19 @@ impl Cell {
|
|||
//
|
||||
// This is to avoid false positives when these variables are referenced
|
||||
// elsewhere in the notebook.
|
||||
//
|
||||
// Refer https://github.com/astral-sh/ruff/issues/13718 for `ipytest`.
|
||||
!matches!(
|
||||
command,
|
||||
"capture" | "debug" | "prun" | "pypy" | "python" | "python3" | "time" | "timeit"
|
||||
"capture"
|
||||
| "debug"
|
||||
| "ipytest"
|
||||
| "prun"
|
||||
| "pypy"
|
||||
| "python"
|
||||
| "python3"
|
||||
| "time"
|
||||
| "timeit"
|
||||
)
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue