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

Implicit line breaks within parentheses vs. operators vs. comments #392

Closed
bersbersbers opened this issue Apr 10, 2018 · 1 comment
Closed
Labels

Comments

@bersbersbers
Copy link

I do not know how to summarize this briefly, comprehensive, and correctly.

Non-comprehensively: autopep8 creates improper syntax. Here's an example:

test.txt

X = (
    1  # 1
    + 2  # 2
    + 3  # 3
    + 4  # 4
    + 5  # 5
    + 6  # 6
    + 7  # 7
)

And this is the output:

C:\>autopep8 --version
autopep8 1.3.5 (pycodestyle: 2.3.1)

C:\>autopep8 test.txt -a -a -a
X = (
    1 +  # 1
    2 +  # 2
    3 +  # 3
    4 +  # 4
    5 +  # 5
    6  # 6 +
    7  # 7
)

Note the operator between 6 and 7, which has been moved behind the comment "# 6".

@hhatto hhatto added the bug label Apr 10, 2018
hhatto added a commit that referenced this issue Apr 10, 2018
Merge branch 'fix-issue-392'
@hhatto
Copy link
Owner

hhatto commented Apr 10, 2018

fix in latest master (fffb20b)

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants