] > Re: [Python-projects] Possibility of using pylint to automatically reformt code? (Logilab.org)

Email Re: [Python-projects] Possibility of using pylint to automatically reformt code?

subject
Re: [Python-projects] Possibility of using pylint to automatically reformt code?
date
2006/04/02 17:16

    Brian> About a week ago I came into a poorly formatted medium sized
    Brian> project, somewhere on the order of 60,000 lines of code. The
    Brian> formatting is really sporadic--some source files have indents of
    Brian> 2, 4, or 8 spaces and lines of 60, 75, or 80 chars--and while
    Brian> pylint correctly points out where the files need to be changed to
    Brian> come into conformance with the style guidelines there is simply
    Brian> too much code to reformat all of that by hand.

The Python distribution comes with a tool called reindent.py.  If it's not
in your distribution you can pull the most recent version out of Subversion:

    http://svn.python.org/view/python/trunk/Tools/scripts/reindent.py?rev=35609&view=log

It's pretty stable.  The last couple changes were some trivial ones I made a
couple years ago.

Skip
_______________________________________________
Python-Projects mailing list
Python-Projects@lists.logilab.org
http://lists.logilab.org/mailman/listinfo/python-projects