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:
Dhruv Manilawala 2023-07-26 13:50:30 +05:30 committed by GitHub
parent 1fdadee59c
commit 025fa4eba8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 228 additions and 19 deletions

View file

@ -428,7 +428,8 @@ where
| Stmt::Break(_)
| Stmt::Continue(_)
| Stmt::Global(_)
| Stmt::Nonlocal(_) => {}
| Stmt::Nonlocal(_)
| Stmt::LineMagic(_) => {}
}
}
@ -723,6 +724,7 @@ where
visitor.visit_expr(expr);
}
}
Expr::LineMagic(_) => (),
}
}