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

Triple-quote multiline strings could be more compact. #697

Closed
FlipperPA opened this issue Feb 6, 2019 · 2 comments
Closed

Triple-quote multiline strings could be more compact. #697

FlipperPA opened this issue Feb 6, 2019 · 2 comments
Labels
T: enhancement New feature or request

Comments

@FlipperPA
Copy link

Operating system: CentOS 7.6
Python version: 3.6
Black version: 18.9b0
Does also happen on master: Yes.

Here's a basic example; Black adds two un-necessary carriage returns to this valid PEP-8 syntax, which is more compact. You can see from the example where this sort of string formatting is frequent. :)

Input:

from example import example_execute

example = example_execute("""
    SELECT something FROM something
""")

Output:

from example import example_execute


example = example_execute(
    """
    SELECT something FROM something
"""
)

Apologies if this is a dupe, but I wasn't able to find an existing issue among the existing multi-line string issues. Thanks for your efforts - I love the package!

@zsol zsol added the T: enhancement New feature or request label Feb 14, 2019
@sitsofe
Copy link

sitsofe commented Mar 12, 2019

Sounds similar to #256 ...

@zsol
Copy link
Collaborator

zsol commented Mar 21, 2019

Yep, let's track this in #256

@zsol zsol closed this as completed Mar 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants