autopep8 icon indicating copy to clipboard operation
autopep8 copied to clipboard

autopep8 on .rst documentation files

Open arthurzenika opened this issue 8 years ago • 1 comments

Thanks for autopep8, it really helps getting some code to a almost readable style when getting legacy code.

I'm currently working on documentation which is in restructured text (.rst), and part of that has been converted from latex with latex2rst, so a lot of fixing needs to be done. I am dreaming about doing autopep8 -i *.rst as I sometimes to with .py files.

Any chance of getting such a feature with autopep8 ? Do you know of any projects that could do this ? I'm going to ask https://github.com/myint/docformatter too if there is place for .rst transformation there...

arthurzenika avatar Sep 22 '17 09:09 arthurzenika

I've actually looked for a reStructuredText formatter in the past. I didn't find one. But if there is one, it seems like it wouldn't be too difficult to have it call autopep8 on the Python code blocks.

myint avatar Sep 23 '17 13:09 myint