mirror of
https://github.com/astral-sh/ruff
synced 2026-01-21 13:30:49 -05:00
Implement template strings (#17851)
This PR implements template strings (t-strings) in the parser and formatter for Ruff. Minimal changes necessary to compile were made in other parts of the code (e.g. ty, the linter, etc.). These will be covered properly in follow-up PRs.
This commit is contained in:
@@ -3012,7 +3012,6 @@ impl<'src> Parser<'src> {
|
||||
// test_ok param_with_annotation
|
||||
// def foo(arg: int): ...
|
||||
// def foo(arg: lambda x: x): ...
|
||||
// def foo(arg: (x := int)): ...
|
||||
|
||||
// test_err param_with_invalid_annotation
|
||||
// def foo(arg: *int): ...
|
||||
@@ -3703,6 +3702,7 @@ impl<'src> Parser<'src> {
|
||||
| TokenKind::Complex
|
||||
| TokenKind::String
|
||||
| TokenKind::FStringStart
|
||||
| TokenKind::TStringStart
|
||||
| TokenKind::Lbrace
|
||||
| TokenKind::Tilde
|
||||
| TokenKind::Ellipsis
|
||||
|
||||
Reference in New Issue
Block a user