diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-08-30 14:30:37 -0400 |
---|---|---|
committer | mike bayer <mike_mp@zzzcomputing.com> | 2021-08-30 20:14:31 +0000 |
commit | ff8fd160ad007cd00353a138457275474a122ff2 (patch) | |
tree | e47dcc5dc4f070b11998d522670f205c1aa69122 /tools | |
parent | ecf6217ab5096bda75fd8ae4e819f412c020c096 (diff) | |
download | alembic-ff8fd160ad007cd00353a138457275474a122ff2.tar.gz |
restore default values for keyword arguments in stubs
Fixed issue in generated .pyi files where default values for ``Optional``
arguments were missing, thereby causing mypy to consider them as required.
Change-Id: I08c4cd7bd04c6763fdc9c5b42abbdcca8fd90e0e
Fixes: #895
Diffstat (limited to 'tools')
-rw-r--r-- | tools/write_pyi.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/tools/write_pyi.py b/tools/write_pyi.py index 054d27f..61c3052 100644 --- a/tools/write_pyi.py +++ b/tools/write_pyi.py @@ -121,9 +121,7 @@ def _generate_stub_for_meth(cls, name, printer): retval = re.sub("NoneType", "None", retval) return retval - argspec = inspect_formatargspec( - *spec, formatvalue=lambda value: "", formatannotation=_formatannotation - ) + argspec = inspect_formatargspec(*spec, formatannotation=_formatannotation) func_text = textwrap.dedent( """\ |