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.58k stars 291 forks source link

Unable to retain tabs indentation (no override?) #242

Open eskhool opened 8 years ago

eskhool commented 8 years ago

pep8 recommends spaces as the preferred format but for those misguided souls like mine who believe in tab indentation (which is permissible via pep8 configuration) autopep8 seems to be forcing it into space based indentation.

Since pep8 allows for tabs (even if it discourages the same), autopep8 should also be configurable to allow for it?

spaceone commented 8 years ago

Downgrading to autopep8 0.9.1 seems to respect tabs (when ignoring E501,E101,W191,E126,E128).

ghost commented 7 years ago

@spaceone i on opposite want it not to respect tabs, but W191 fix doesn't work.

jxenos commented 5 years ago

@spaceone Downgrading seems like a bad option, and I don't want to ignore those errors/warnings, I want to have them thrown when spaces are used instead of tabs. Is this really not an option?

spaceone commented 5 years ago

@jxenos I am not a maintainer of autopep8. This is just the solution I had to use when we migrated our hole code base. I would still like to see this feature as it would ease the use of autopep8 still nowerdays.