Skip to content

Commit

Permalink
Traverse argument default before argument annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
jgberry committed Jun 20, 2023
1 parent 30734f0 commit 9338be2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/ruff_python_ast/src/visitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -633,10 +633,10 @@ pub fn walk_arg_with_default<'a, V: Visitor<'a> + ?Sized>(
visitor: &mut V,
arg_with_default: &'a ArgWithDefault,
) {
visitor.visit_arg(&arg_with_default.def);
if let Some(expr) = &arg_with_default.default {
visitor.visit_expr(expr);
}
visitor.visit_arg(&arg_with_default.def);
}

pub fn walk_keyword<'a, V: Visitor<'a> + ?Sized>(visitor: &mut V, keyword: &'a Keyword) {
Expand Down

0 comments on commit 9338be2

Please sign in to comment.