string.templatelib: do not allow concatenating Template with str (#14480)

Fixes #14479
This commit is contained in:
Dutcho
2025-07-28 00:19:34 +02:00
committed by GitHub
parent c04c911254
commit 9f13289be1
+1 -1
View File
@@ -11,7 +11,7 @@ class Template: # TODO: consider making `Template` generic on `TypeVarTuple`
def __new__(cls, *args: str | Interpolation) -> Template: ...
def __iter__(self) -> Iterator[str | Interpolation]: ...
def __add__(self, other: Template | str) -> Template: ...
def __add__(self, other: Template, /) -> Template: ...
def __class_getitem__(cls, item: Any, /) -> GenericAlias: ...
@property
def values(self) -> tuple[Any, ...]: ... # Tuple of interpolation values, which can have any type