bpo-32018: Fix inspect.signature repr to follow PEP 8 (#4408)
This commit is contained in:
parent
f8a4c03ede
commit
762b9571c9
|
@ -2525,6 +2525,9 @@ class Parameter:
|
|||
formatannotation(self._annotation))
|
||||
|
||||
if self._default is not _empty:
|
||||
if self._annotation is not _empty:
|
||||
formatted = '{} = {}'.format(formatted, repr(self._default))
|
||||
else:
|
||||
formatted = '{}={}'.format(formatted, repr(self._default))
|
||||
|
||||
if kind == _VAR_POSITIONAL:
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
inspect.signature should follow PEP 8, if the parameter has an annotation and a
|
||||
default value. Patch by Dong-hee Na.
|
Loading…
Reference in New Issue