Auto-formatting produces results with PEP8 complaints

The following minimal example shows the result of auto-formatting the code in PyCharm, which it immediately complains about.

Sure, one can manually indent the lines correctly, but when auto-formatting the source file again, it will break again.


Is there any editor settings I can tweak to make it work correctly?

Comment actions Permalink



Could you please provide a code example before formatting? 


Thank you in advance! 

Comment actions Permalink

Sure, before auto-formatting (correct according to PEP8):

And after auto-formatting (incorrect according to PEP8):

Comment actions Permalink

Thank you for the examples!


Please vote for the following bugs to increase priority:


Apologies for the inconvenience. 


Please sign in to leave a comment.