diff --git a/stdlib/2/string.pyi b/stdlib/2/string.pyi index fc06f1a0c..ecdf23fc1 100644 --- a/stdlib/2/string.pyi +++ b/stdlib/2/string.pyi @@ -52,13 +52,13 @@ class Template: def __init__(self, template: Text) -> None: ... @overload - def substitute(self, mapping: Mapping[Text, str] = ..., **kwds: str) -> str: ... + def substitute(self, mapping: Union[Mapping[str, str], Mapping[unicode, str]] = ..., **kwds: str) -> str: ... @overload - def substitute(self, mapping: Mapping[Text, Text] = ..., **kwds: Text) -> Text: ... + def substitute(self, mapping: Union[Mapping[str, Text], Mapping[unicode, Text]] = ..., **kwds: Text) -> Text: ... @overload - def safe_substitute(self, mapping: Mapping[Text, str] = ..., **kwds: str) -> str: ... + def safe_substitute(self, mapping: Union[Mapping[str, str], Mapping[unicode, str]] = ..., **kwds: str) -> str: ... @overload - def safe_substitute(self, mapping: Mapping[Text, Text] = ..., **kwds: Text) -> Text: ... + def safe_substitute(self, mapping: Union[Mapping[str, Text], Mapping[unicode, Text]], **kwds: Text) -> Text: ... # TODO(MichalPokorny): This is probably badly and/or loosely typed. class Formatter(object):