mirror of
https://github.com/astral-sh/ruff
synced 2026-01-10 08:04:26 -05:00
Rename visit_preorder to visit_source_order (#17046)
## Summary We renamed the `PreorderVisitor` to `SourceOrderVisitor` a long time ago but it seems that we missed to rename the `visit_preorder` functions to `visit_source_order`. This PR renames `visit_preorder` to `visit_source_order` ## Test Plan `cargo test`
This commit is contained in:
@@ -481,7 +481,7 @@ def write_anynoderef(out: list[str], ast: Ast) -> None:
|
||||
- `impl<'a> From<&'a TypeParamTypeVarTuple> for AnyNodeRef<'a>`
|
||||
- `impl Ranged for AnyNodeRef<'_>`
|
||||
- `fn AnyNodeRef::as_ptr(&self) -> std::ptr::NonNull<()>`
|
||||
- `fn AnyNodeRef::visit_preorder(self, visitor &mut impl SourceOrderVisitor)`
|
||||
- `fn AnyNodeRef::visit_source_order(self, visitor &mut impl SourceOrderVisitor)`
|
||||
"""
|
||||
|
||||
out.append("""
|
||||
@@ -564,7 +564,7 @@ def write_anynoderef(out: list[str], ast: Ast) -> None:
|
||||
|
||||
out.append("""
|
||||
impl<'a> AnyNodeRef<'a> {
|
||||
pub fn visit_preorder<'b, V>(self, visitor: &mut V)
|
||||
pub fn visit_source_order<'b, V>(self, visitor: &mut V)
|
||||
where
|
||||
V: crate::visitor::source_order::SourceOrderVisitor<'b> + ?Sized,
|
||||
'a: 'b,
|
||||
|
||||
2
crates/ruff_python_ast/src/generated.rs
generated
2
crates/ruff_python_ast/src/generated.rs
generated
@@ -6027,7 +6027,7 @@ impl AnyNodeRef<'_> {
|
||||
}
|
||||
|
||||
impl<'a> AnyNodeRef<'a> {
|
||||
pub fn visit_preorder<'b, V>(self, visitor: &mut V)
|
||||
pub fn visit_source_order<'b, V>(self, visitor: &mut V)
|
||||
where
|
||||
V: crate::visitor::source_order::SourceOrderVisitor<'b> + ?Sized,
|
||||
'a: 'b,
|
||||
|
||||
Reference in New Issue
Block a user