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

Style issue with triple quotes #1216

Closed
justinmoon opened this issue Dec 28, 2019 · 2 comments
Closed

Style issue with triple quotes #1216

justinmoon opened this issue Dec 28, 2019 · 2 comments
Labels
T: style What do we want Blackened code to look like?

Comments

@justinmoon
Copy link

justinmoon commented Dec 28, 2019

I was following along with the Ariadne GraphQL server tutorial where we defined this beautiful little snippet representing a "Hello, world!" GraphQL query:

type_defs = gql("""
    type Query {
        hello String!
    }
""")

Black formatted it into this:

type_defs = gql(
    """
    type Query {
        hello String!
    }
"""
)

I'm not sure what the "right thing" is here, but the black formatted version looks much worse to me. It's 2 lines longer and the quotes have mismatched indentation. It's the first time I've had an "ewwww" reaction to black's formatting, so I figured I'd leave you folks some feedback 👍

I'm using black, version 18.9b0

@justinmoon justinmoon added the T: style What do we want Blackened code to look like? label Dec 28, 2019
@hugovk
Copy link
Contributor

hugovk commented Dec 28, 2019

How's it look with 19.10b0?

@zsol
Copy link
Collaborator

zsol commented Dec 28, 2019

Let's track this in #256

@zsol zsol closed this as completed Dec 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T: style What do we want Blackened code to look like?
Projects
None yet
Development

No branches or pull requests

3 participants