mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-29 13:25:17 +00:00
Fix ArgWithDefault comments handling (#5204)
This commit is contained in:
parent
fde5dbc9aa
commit
e520a3a721
17 changed files with 73 additions and 69 deletions
|
@ -236,6 +236,13 @@ impl<'ast> PreorderVisitor<'ast> for CommentsVisitor<'ast> {
|
|||
self.finish_node(arg);
|
||||
}
|
||||
|
||||
fn visit_arg_with_default(&mut self, arg_with_default: &'ast ArgWithDefault) {
|
||||
if self.start_node(arg_with_default).is_traverse() {
|
||||
walk_arg_with_default(self, arg_with_default);
|
||||
}
|
||||
self.finish_node(arg_with_default);
|
||||
}
|
||||
|
||||
fn visit_keyword(&mut self, keyword: &'ast Keyword) {
|
||||
if self.start_node(keyword).is_traverse() {
|
||||
walk_keyword(self, keyword);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue