mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-02 06:42:02 +00:00
Create dedicated Body
nodes in the formatter CST (#3223)
This commit is contained in:
parent
cd6413ca09
commit
2261e194a0
23 changed files with 1239 additions and 611 deletions
|
@ -194,5 +194,7 @@ impl<'a> Visitor<'a> for ParenthesesNormalizer<'_> {
|
|||
/// during formatting) and `Parenthesize` (which are used during formatting).
|
||||
pub fn normalize_parentheses(python_cst: &mut [Stmt], locator: &Locator) {
|
||||
let mut normalizer = ParenthesesNormalizer { locator };
|
||||
normalizer.visit_body(python_cst);
|
||||
for stmt in python_cst {
|
||||
normalizer.visit_stmt(stmt);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue