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:
@@ -659,10 +659,11 @@ impl Format<PyFormatContext<'_>> for FormatEnclosingNode<'_> {
|
||||
| AnyNodeRef::ExprYieldFrom(_)
|
||||
| AnyNodeRef::ExprCompare(_)
|
||||
| AnyNodeRef::ExprCall(_)
|
||||
| AnyNodeRef::FStringExpressionElement(_)
|
||||
| AnyNodeRef::FStringLiteralElement(_)
|
||||
| AnyNodeRef::FStringFormatSpec(_)
|
||||
| AnyNodeRef::InterpolatedElement(_)
|
||||
| AnyNodeRef::InterpolatedStringLiteralElement(_)
|
||||
| AnyNodeRef::InterpolatedStringFormatSpec(_)
|
||||
| AnyNodeRef::ExprFString(_)
|
||||
| AnyNodeRef::ExprTString(_)
|
||||
| AnyNodeRef::ExprStringLiteral(_)
|
||||
| AnyNodeRef::ExprBytesLiteral(_)
|
||||
| AnyNodeRef::ExprNumberLiteral(_)
|
||||
@@ -679,6 +680,7 @@ impl Format<PyFormatContext<'_>> for FormatEnclosingNode<'_> {
|
||||
| AnyNodeRef::ExprIpyEscapeCommand(_)
|
||||
| AnyNodeRef::FString(_)
|
||||
| AnyNodeRef::StringLiteral(_)
|
||||
| AnyNodeRef::TString(_)
|
||||
| AnyNodeRef::PatternMatchValue(_)
|
||||
| AnyNodeRef::PatternMatchSingleton(_)
|
||||
| AnyNodeRef::PatternMatchSequence(_)
|
||||
|
||||
Reference in New Issue
Block a user