andviro / flake8-vim

Pyflakes, Pep8 and mccabe code complexity checker for Vim, bundled with latest libraries for easy installation
63 stars 18 forks source link

autopep8 is overriding pep8 continued_indentation #10

Closed char101 closed 10 years ago

char101 commented 10 years ago

Hi,

autopep8 is replacing pep8 continued_indentation with its own function

del pep8._checks['logical_line'][pep8.continued_indentation]
pep8.register_check(continued_indentation)

The problem is that the function from autopep8 does not explain the error, instead it only prints the error code and the indent level e.g. E125 {0}.

andviro commented 10 years ago

Thanks, patched it up in c113125dcc.

char101 commented 10 years ago

Thanks, but I'm suspicious that autopep8 overrides that function because it uses the indent value when formatting the source files.

So wouldn't it be safer to restore autopep8 continuedindentation before fix* and remove it again afterwards?

andviro commented 10 years ago

Well, I made it into context for check function only, but autopep8 does not fix hanging indent errors nevertheless.