mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 05:51:52 +08:00
Fix a py2 parameter type in string.Template.(safe_)substitute. (#2888)
Context: https://github.com/python/typeshed/pull/2871#issuecomment-476806895
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user