From ecc400f125f96230b939734f0aa9ee4cd9705bd5 Mon Sep 17 00:00:00 2001 From: Alvaro Caceres Date: Mon, 12 Sep 2016 13:12:28 -0500 Subject: [PATCH] Make string.Template.substitute's arg optional (#535) --- stdlib/2.7/string.pyi | 4 ++-- stdlib/3/string.pyi | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/stdlib/2.7/string.pyi b/stdlib/2.7/string.pyi index 09fcc5df6..4bbfb486c 100644 --- a/stdlib/2.7/string.pyi +++ b/stdlib/2.7/string.pyi @@ -52,8 +52,8 @@ class Template(object): template = ... # type: str def __init__(self, template: str) -> None: ... - def substitute(self, mapping: Mapping[str, str], **kwds: str) -> str: ... - def safe_substitute(self, mapping: Mapping[str, str], + def substitute(self, mapping: Mapping[str, str] = ..., **kwds: str) -> str: ... + def safe_substitute(self, mapping: Mapping[str, str] = ..., **kwds: str) -> str: ... # TODO(MichalPokorny): This is probably badly and/or loosely typed. diff --git a/stdlib/3/string.pyi b/stdlib/3/string.pyi index e2c7291ed..365449ed4 100644 --- a/stdlib/3/string.pyi +++ b/stdlib/3/string.pyi @@ -20,8 +20,8 @@ class Template: template = ... # type: str def __init__(self, template: str) -> None: ... - def substitute(self, mapping: Mapping[str, str], **kwds: str) -> str: ... - def safe_substitute(self, mapping: Mapping[str, str], + def substitute(self, mapping: Mapping[str, str] = ..., **kwds: str) -> str: ... + def safe_substitute(self, mapping: Mapping[str, str] = ..., **kwds: str) -> str: ... # TODO(MichalPokorny): This is probably badly and/or loosely typed.