mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-03 07:04:53 +00:00
upgrade rustpython to remove tuple-constants (#5840)
c.f. https://github.com/astral-sh/RustPython-Parser/pull/28 Tests: No snapshots changed --------- Co-authored-by: Zanie <contact@zanie.dev>
This commit is contained in:
parent
e574a6a769
commit
52aa2fc875
13 changed files with 131 additions and 206 deletions
|
@ -26,9 +26,7 @@ pub trait PreorderVisitor<'a> {
|
|||
walk_decorator(self, decorator);
|
||||
}
|
||||
|
||||
fn visit_constant(&mut self, constant: &'a Constant) {
|
||||
walk_constant(self, constant);
|
||||
}
|
||||
fn visit_constant(&mut self, _constant: &'a Constant) {}
|
||||
|
||||
fn visit_bool_op(&mut self, bool_op: &'a BoolOp) {
|
||||
walk_bool_op(self, bool_op);
|
||||
|
@ -693,17 +691,6 @@ where
|
|||
}
|
||||
}
|
||||
|
||||
pub fn walk_constant<'a, V>(visitor: &mut V, constant: &'a Constant)
|
||||
where
|
||||
V: PreorderVisitor<'a> + ?Sized,
|
||||
{
|
||||
if let Constant::Tuple(constants) = constant {
|
||||
for constant in constants {
|
||||
visitor.visit_constant(constant);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn walk_comprehension<'a, V>(visitor: &mut V, comprehension: &'a Comprehension)
|
||||
where
|
||||
V: PreorderVisitor<'a> + ?Sized,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue