mirror of
https://github.com/python/cpython.git
synced 2025-11-01 10:45:30 +00:00
bpo-32018: Fix inspect.signature repr to follow PEP 8 (#4408)
This commit is contained in:
parent
f8a4c03ede
commit
762b9571c9
4 changed files with 10 additions and 5 deletions
|
|
@ -2875,12 +2875,12 @@ class TestSignatureObject(unittest.TestCase):
|
|||
def foo(a:int=1, *, b, c=None, **kwargs) -> 42:
|
||||
pass
|
||||
self.assertEqual(str(inspect.signature(foo)),
|
||||
'(a:int=1, *, b, c=None, **kwargs) -> 42')
|
||||
'(a: int = 1, *, b, c=None, **kwargs) -> 42')
|
||||
|
||||
def foo(a:int=1, *args, b, c=None, **kwargs) -> 42:
|
||||
pass
|
||||
self.assertEqual(str(inspect.signature(foo)),
|
||||
'(a:int=1, *args, b, c=None, **kwargs) -> 42')
|
||||
'(a: int = 1, *args, b, c=None, **kwargs) -> 42')
|
||||
|
||||
def foo():
|
||||
pass
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue