Skip to content

no opinion on tuple assignment parentheses? #445

@matejcik

Description

@matejcik

This might be intentional but it feels like an omission, so I'm reporting it.

Does Black not have an opinion on parentheses around tuples, when assigning or returning? The following file remains untouched:

(a, b, c) = 1, 2, 3
a, b, c = (1, 2, 3)
return (d, e, f)
return 1, 2, 3

I would expect the optional parentheses would be removed in all above cases, per this: "In those cases, parentheses are removed when the entire statement fits in one line, or if the inner expression doesn't have any delimiters to further split on."

Operating system: Linux Mint
Python version: 3.6
Black version: 18.6b4
Does also happen on master: yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    F: parenthesesToo many parentheses, not enough parentheses, and so on.T: enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions