hhatto / autopep8

A tool that automatically formats Python code to conform to the PEP 8 style guide.
https://pypi.org/project/autopep8/
MIT License
4.56k stars 290 forks source link

wrong continued indentation #248

Open chtenb opened 8 years ago

chtenb commented 8 years ago
for name in ['A_NORMAL',
             'A_STANDOUT',
             'A_UNDERLINE',
             ]: # X
    pass

This code is idempotent under autopep8, but pylint complains about the line marked with X having a wrong continued indentation. This is fixed when decreasing the indentation with one space. Is pylint wrong here, or is autopep8 formatting wrongly?

for name in [
        'A_NORMAL',
    'A_STANDOUT',
    'A_UNDERLINE',
]:
    pass

This code is idempotent as well. I think it is clear what is wrong here.

My autopep8 version is 1.2.4.

myint commented 8 years ago

I think it is a pylint problem.

https://github.com/PyCQA/pylint/issues/638

chtenb commented 8 years ago

What about the second case? On Jul 8, 2016 7:36 PM, "Steven Myint" notifications@github.com wrote:

I think it is a pylint problem.

PyCQA/pylint#638 https://github.com/PyCQA/pylint/issues/638

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/hhatto/autopep8/issues/248#issuecomment-231423316, or mute the thread https://github.com/notifications/unsubscribe/AA-7MbSlBZw3dG6luRGkqPnCSh-j7OrRks5qToqmgaJpZM4JGRL2 .