mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-31 23:57:54 +00: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:
parent
ad024f9a09
commit
9bbf4987e8
261 changed files with 18023 additions and 1802 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue