Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't insert space after comma for singleton tuples #21

Open
tobiasherp opened this issue May 30, 2014 · 0 comments
Open

Don't insert space after comma for singleton tuples #21

tobiasherp opened this issue May 30, 2014 · 0 comments

Comments

@tobiasherp
Copy link

Currently pep8ify seems to insert a blank between the comma and the closing bracket of a singleton tuple. I consider this an error. In contradiction to what was written in issue #8, there is a difference between singleton tuples and singleton lists :

>>> tup = (1,)
>>> tup
(1,)
>>> liz = [1,]
>>> liz
[1]

IMO, since the string representation of singleton tuples includes no space before the closing bracket, pep8ify should not insert one. The rule to avoid blanks inside brackets beats the rule to insert a space after commas in this special case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant