Skip to content

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

@tobiasherp

Description

@tobiasherp

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions