sublimetext2 - Clean Python code with Sublime -
i clean long python code:
indentations (sometimes used 2 whitespaces, 4 whitespaces), have 4 everywhre
sometimes have unwanted whitespaces @ end of line :
print "hello" <eol>
using sublime text's edit > line > reindent doesn't work python. example: doing on:
for in range(27): if == b: print print "finished"
would give
for in range(27): if == b: print print "finished"
which not same thing!
what use beautify python code?
you can use autopep8 : https://pypi.python.org/pypi/autopep8/
$ autopep8 --in-place --aggressive <filename>
Comments
Post a Comment