mirror of
https://github.com/astral-sh/ruff.git
synced 2025-07-22 12:35:08 +00:00
Integrate the new Jupyter AST nodes in Ruff (#6086)
## Summary This PR adds the implementation for the new Jupyter AST nodes i.e., `ExprLineMagic` and `StmtLineMagic`. ## Test Plan Add test cases for `unparse` containing magic commands resolves: #6087
This commit is contained in:
parent
1fdadee59c
commit
025fa4eba8
14 changed files with 228 additions and 19 deletions
|
@ -281,6 +281,7 @@ where
|
|||
.map_or(false, |value| any_over_expr(value, func))
|
||||
}
|
||||
Expr::Name(_) | Expr::Constant(_) => false,
|
||||
Expr::LineMagic(_) => false,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -583,6 +584,7 @@ where
|
|||
range: _range,
|
||||
}) => any_over_expr(value, func),
|
||||
Stmt::Pass(_) | Stmt::Break(_) | Stmt::Continue(_) => false,
|
||||
Stmt::LineMagic(_) => false,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue