Skip to content

Commit

Permalink
Visit TypeVar and NewType name arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
charliermarsh committed May 24, 2023
1 parent 3644695 commit 8289e3d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions crates/ruff/src/checkers/ast/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4061,12 +4061,18 @@ where
}
Some(Callable::NewType) => {
self.visit_expr(func);
if !args.is_empty() {
self.visit_non_type_definition(&args[0]);
}
for expr in args.iter().skip(1) {
self.visit_type_definition(expr);
}
}
Some(Callable::TypeVar) => {
self.visit_expr(func);
if !args.is_empty() {
self.visit_non_type_definition(&args[0]);
}
for expr in args.iter().skip(1) {
self.visit_type_definition(expr);
}
Expand Down

0 comments on commit 8289e3d

Please sign in to comment.