-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integrate the new Jupyter AST nodes in Ruff #6086
Conversation
Current dependencies on/for this PR:
This comment was auto-generated by Graphite. |
00c27b8
to
758ba0b
Compare
@@ -671,11 +671,13 @@ impl<'stmt> BasicBlocksBuilder<'stmt> { | |||
| Expr::Await(_) | |||
| Expr::Yield(_) | |||
| Expr::YieldFrom(_) => self.unconditional_next_block(after), | |||
Expr::LineMagic(_) => todo!(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The unreachable rule is under development, so I've left them as it is for now.
@@ -92,6 +92,7 @@ impl FormatRule<Expr, PyFormatContext<'_>> for FormatExpr { | |||
Expr::List(expr) => expr.format().fmt(f), | |||
Expr::Tuple(expr) => expr.format().fmt(f), | |||
Expr::Slice(expr) => expr.format().fmt(f), | |||
Expr::LineMagic(_) => todo!(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can update the formatter todo!()
later.
PR Check ResultsEcosystem✅ ecosystem check detected no changes. BenchmarkLinux
Windows
|
i.e., `unparse`
Summary
This PR adds the implementation for the new Jupyter AST nodes i.e.,
ExprLineMagic
andStmtLineMagic
.Test Plan
Add test cases for
unparse
containing magic commandsresolves: #6087