mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-03 18:28:56 +00:00
Implement AnyNode
/AnyNodeRef
for FStringFormatSpec
(#9836)
## Summary This PR adds the `AnyNode` and `AnyNodeRef` implementation for `FStringFormatSpec` node which will be required in the f-string formatting. The main usage for this is so that we can pass in the node directly to `suppressed_node` in case debug expression is used to format is as verbatim text.
This commit is contained in:
parent
b3dc565473
commit
36b752876e
2 changed files with 69 additions and 0 deletions
|
@ -666,6 +666,7 @@ impl Format<PyFormatContext<'_>> for FormatEnclosingNode<'_> {
|
|||
| AnyNodeRef::ExprCall(_)
|
||||
| AnyNodeRef::FStringExpressionElement(_)
|
||||
| AnyNodeRef::FStringLiteralElement(_)
|
||||
| AnyNodeRef::FStringFormatSpec(_)
|
||||
| AnyNodeRef::ExprFString(_)
|
||||
| AnyNodeRef::ExprStringLiteral(_)
|
||||
| AnyNodeRef::ExprBytesLiteral(_)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue