@@ -188,6 +188,13 @@ def ast3_parse(
188188 ast_TypeVar = Any
189189 ast_TypeVarTuple = Any
190190
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+
191198N = TypeVar ("N" , bound = Node )
192199
193200# There is no way to create reasonable fallbacks at this stage,
@@ -1705,6 +1712,21 @@ def visit_FormattedValue(self, n: ast3.FormattedValue) -> Expression:
17051712 )
17061713 return self .set_line (result_expression , n )
17071714
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+
17081730 # Attribute(expr value, identifier attr, expr_context ctx)
17091731 def visit_Attribute (self , n : Attribute ) -> MemberExpr | SuperExpr :
17101732 value = n .value
0 commit comments