Return line stripped of trailing spaces, tabs, newlines. Note that line.rstrip() instead also strips sundry control characters, but at least one known Emacs user expects to keep junk like that, not mentioning Barry by name or anything .
(line, JUNK='\n \t')
| 158 | |
| 159 | |
| 160 | def _rstrip(line, JUNK='\n \t'): |
| 161 | """Return line stripped of trailing spaces, tabs, newlines. |
| 162 | |
| 163 | Note that line.rstrip() instead also strips sundry control characters, |
| 164 | but at least one known Emacs user expects to keep junk like that, not |
| 165 | mentioning Barry by name or anything <wink>. |
| 166 | """ |
| 167 | |
| 168 | i = len(line) |
| 169 | while i > 0 and line[i - 1] in JUNK: |
| 170 | i -= 1 |
| 171 | return line[:i] |
| 172 | |
| 173 | |
| 174 | class Reindenter: |
no outgoing calls
no test coverage detected
searching dependent graphs…