This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients THRlWiTi, asvetlov, eric.araujo, gpolo, kbk, ned.deily, rhettinger, roger.serwy, taleinat, terry.reedy
Date 2019-11-18.06:11:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1574057482.45.0.312203820272.issue5150@roundup.psfhosted.org>
In-reply-to
Content
reindent.py does the following:

1. Change Python (.py) files to use 4-space indents and no hard tab characters.  IDLE editor does this by default, as do other programming editors, except as PEP8 recommends something else for continuation lines within fences <(), [], {}>.  Before doing anything with reindent, I would want to check whether it messes with IDLE;s smart indents.

The format module and Format menu has functions to add/remove tabs and changes space indents, as well as rewrap.

The only thing left is dealing with a messed up file, but suspect that this is rarer than 19 (1st public version of reindent.py) or even 10 years ago (this issue).  Is this issue still needed?

2. Trim excess spaces and tabs from ends of lines.  Format => strip whitespace, added on this issue, does this. (The code is now in the format module.)

3. Remove empty lines at the end of files.  Rstrip should do this but does not.  This is a separate issue from reindenting.

4. Ensure that the last line ends with a newline.  Save in iomenu ensures this, but this should be part of 'strip whitespace', especially if we 'rstrip' on save (#33046).
History
Date User Action Args
2019-11-18 06:11:22terry.reedysetrecipients: + terry.reedy, rhettinger, kbk, taleinat, gpolo, ned.deily, roger.serwy, eric.araujo, asvetlov, THRlWiTi
2019-11-18 06:11:22terry.reedysetmessageid: <1574057482.45.0.312203820272.issue5150@roundup.psfhosted.org>
2019-11-18 06:11:22terry.reedylinkissue5150 messages
2019-11-18 06:11:21terry.reedycreate