Skip to content

Nested Tuples are not well formatted #2402

@michaelmiscanuk

Description

@michaelmiscanuk

I have some nested tuples, but unfortunately one of them is not well formatted with black.

First one is formatted well but look at the second one - BOOK_CHOICES.
Can you explain why is that happening?


RADIO_CHOICES = (
    ("Value One", "Value One Display"),
    ("Value Two", "Text For Value Two"),
    ("Value Three", "Value Three's Display Text"),
)

BOOK_CHOICES = (
    (
        "Non-Fiction",
        (("1", "Deep Learning with Keras"), ("2", "Web Development with Django")),
    ),
    ("Fiction", (("3", "Brave New World"), ("4", "The Great Gatsby"))),
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    F: linebreakHow should we split up lines?F: parenthesesToo many parentheses, not enough parentheses, and so on.T: user supportOP looking for assistance or answers to a question
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions