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

max_line_length not used #1243

Closed
gr4viton opened this issue Jan 22, 2020 · 0 comments · Fixed by #1132
Closed

max_line_length not used #1243

gr4viton opened this issue Jan 22, 2020 · 0 comments · Fixed by #1132

Comments

@gr4viton
Copy link

gr4viton commented Jan 22, 2020

Black v19.10b0

Playground link

Options

--line-length=120
--skip-string-normalization

Input

class Step(StepBase):

    def who(self):
        self.cmd = 'SR AAAA-CORRECT NAME IS {last_name} {first_name}{middle_name} {title}/P{passenger_association}'.format(
            last_name=last_name,
            first_name=first_name,
            middle_name=middle_name,
            title=title,
            passenger_association=passenger_association,
        )

Output

class Step(StepBase):
    def who(self):
        self.cmd = 'SR AAAA-CORRECT NAME IS {last_name} {first_name}{middle_name} {title}/P{passenger_association}'.format(
            last_name=last_name,
            first_name=first_name,
            middle_name=middle_name,
            title=title,
            passenger_association=passenger_association,
        )

Expected

class Step(StepBase):
    def who(self):
        self.cmd = (
            'SR AAAA-CORRECT NAME IS {last_name} {first_name}{middle_name} {title}/P{passenger_association}'.format(
                last_name=last_name,
                first_name=first_name,
                middle_name=middle_name,
                title=title,
                passenger_association=passenger_association,
            )
        )
bbugyi200 added a commit to bbugyi200/black that referenced this issue Mar 15, 2020
@ambv ambv closed this as completed in #1132 May 8, 2020
ambv pushed a commit that referenced this issue May 8, 2020
This pull request's main intention is to wraps long strings (as requested by #182); however, it also provides better string handling in general and, in doing so, closes the following issues:

Closes #26
Closes #182
Closes #933
Closes #1183
Closes #1243
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant