@@ -188,6 +188,13 @@ def ast3_parse(
188
188
ast_TypeVar = Any
189
189
ast_TypeVarTuple = Any
190
190
191
+ if sys .version_info >= (3 , 14 ):
192
+ ast_TemplateStr = ast3 .TemplateStr
193
+ ast_Interpolation = ast3 .Interpolation
194
+ else :
195
+ ast_TemplateStr = Any
196
+ ast_Interpolation = Any
197
+
191
198
N = TypeVar ("N" , bound = Node )
192
199
193
200
# There is no way to create reasonable fallbacks at this stage,
@@ -1705,6 +1712,21 @@ def visit_FormattedValue(self, n: ast3.FormattedValue) -> Expression:
1705
1712
)
1706
1713
return self .set_line (result_expression , n )
1707
1714
1715
+ # TemplateStr(expr* values)
1716
+ def visit_TemplateStr (self , n : ast_TemplateStr ) -> Expression :
1717
+ self .fail (
1718
+ ErrorMessage ("PEP 750 template strings are not yet supported" ),
1719
+ n .lineno ,
1720
+ n .col_offset ,
1721
+ blocker = False ,
1722
+ )
1723
+ e = TempNode (AnyType (TypeOfAny .from_error ))
1724
+ return self .set_line (e , n )
1725
+
1726
+ # Interpolation(expr value, constant str, int conversion, expr? format_spec)
1727
+ def visit_Interpolation (self , n : ast_Interpolation ) -> Expression :
1728
+ assert False , "Unreachable"
1729
+
1708
1730
# Attribute(expr value, identifier attr, expr_context ctx)
1709
1731
def visit_Attribute (self , n : Attribute ) -> MemberExpr | SuperExpr :
1710
1732
value = n .value
0 commit comments