Skip to content

Commit

Permalink
Type statement uses Lsqb, not Lpar
Browse files Browse the repository at this point in the history
  • Loading branch information
dhruvmanila committed May 20, 2024
1 parent cc321d8 commit 22f51f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/ruff_python_parser/src/parser/statement.rs
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ impl<'src> Parser<'src> {
let (first, second) = self.tokens.peek2();

if (first == TokenKind::Name || first.is_soft_keyword())
&& matches!(second, TokenKind::Lpar | TokenKind::Equal)
&& matches!(second, TokenKind::Lsqb | TokenKind::Equal)
{
return Stmt::TypeAlias(self.parse_type_alias_statement());
}
Expand Down

0 comments on commit 22f51f3

Please sign in to comment.