[issue32018] inspect.signature does not respect PEP 8

2017-11-15 Thread Yury Selivanov

Change by Yury Selivanov :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32018] inspect.signature does not respect PEP 8

2017-11-15 Thread Yury Selivanov

Yury Selivanov  added the comment:


New changeset 762b9571c9c8c6b036f1bf90140a1d030b3f9a01 by Yury Selivanov 
(Dong-hee Na) in branch 'master':
bpo-32018: Fix inspect.signature repr to follow PEP 8 (#4408)
https://github.com/python/cpython/commit/762b9571c9c8c6b036f1bf90140a1d030b3f9a01


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32018] inspect.signature does not respect PEP 8

2017-11-15 Thread Dong-hee Na

Dong-hee Na  added the comment:

I've submitted a patch. :)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32018] inspect.signature does not respect PEP 8

2017-11-15 Thread Dong-hee Na

Change by Dong-hee Na :


--
nosy: +corona10

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32018] inspect.signature does not respect PEP 8

2017-11-15 Thread Dong-hee Na

Change by Dong-hee Na :


--
keywords: +patch
pull_requests: +4357
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32018] inspect.signature does not respect PEP 8

2017-11-13 Thread R. David Murray

R. David Murray  added the comment:

Agreed.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32018] inspect.signature does not respect PEP 8

2017-11-13 Thread Guido van Rossum

Guido van Rossum  added the comment:

Those people who read and write annotations regularly are all using the 
convention that was added to PEP 8, so let's make inspect follow that lead 
rather than argue about it here. :-)

--
nosy: +gvanrossum

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32018] inspect.signature does not respect PEP 8

2017-11-13 Thread Eric V. Smith

Change by Eric V. Smith :


--
nosy: +eric.smith

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32018] inspect.signature does not respect PEP 8

2017-11-13 Thread R. David Murray

R. David Murray  added the comment:

FWIW, I find the version without the spaces to be more readable (but I don't 
find annotations to be readable in general, so my opinion may not be worth much 
:)

--
nosy: +r.david.murray

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32018] inspect.signature does not respect PEP 8

2017-11-13 Thread Ivan Levkivskyi

New submission from Ivan Levkivskyi :

The string representation of a function signature with annotations is currently 
like this:

>>> def __init__(self, x: int = 1, y: int = 2) -> None: pass
... 
>>> import inspect
>>> str(inspect.signature(__init__))
'(self, x:str=1, y:int=2) -> None'

At the same time PEP 8 says:

When combining an argument annotation with a default value, use spaces around 
the = sign (but only for those arguments that have both an annotation and a 
default).

Yes:

def munge(sep: AnyStr = None): ...
def munge(input: AnyStr, sep: AnyStr = None, limit=1000): ...

No:

def munge(input: AnyStr=None): ...
def munge(input: AnyStr, limit = 1000): ...

I think there should be spaces in the signature repr.

--
messages: 306171
nosy: levkivskyi, yselivanov
priority: normal
severity: normal
status: open
title: inspect.signature does not respect PEP 8
type: behavior
versions: Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com