Skip to content

Commit 9f13289

Browse files
authored
string.templatelib: do not allow concatenating Template with str (#14480)
Fixes #14479
1 parent c04c911 commit 9f13289

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stdlib/string/templatelib.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class Template: # TODO: consider making `Template` generic on `TypeVarTuple`
1111

1212
def __new__(cls, *args: str | Interpolation) -> Template: ...
1313
def __iter__(self) -> Iterator[str | Interpolation]: ...
14-
def __add__(self, other: Template | str) -> Template: ...
14+
def __add__(self, other: Template, /) -> Template: ...
1515
def __class_getitem__(cls, item: Any, /) -> GenericAlias: ...
1616
@property
1717
def values(self) -> tuple[Any, ...]: ... # Tuple of interpolation values, which can have any type

0 commit comments

Comments
 (0)