Message356845
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). |
|
Date |
User |
Action |
Args |
2019-11-18 06:11:22 | terry.reedy | set | recipients:
+ terry.reedy, rhettinger, kbk, taleinat, gpolo, ned.deily, roger.serwy, eric.araujo, asvetlov, THRlWiTi |
2019-11-18 06:11:22 | terry.reedy | set | messageid: <1574057482.45.0.312203820272.issue5150@roundup.psfhosted.org> |
2019-11-18 06:11:22 | terry.reedy | link | issue5150 messages |
2019-11-18 06:11:21 | terry.reedy | create | |
|