<p></p>
<p>The <a href="https://github.com/geany/geany/blob/master/scripts/rstrip-whitespace.py">rstrip-whitespace.py</a> script contains redundant code.</p>
<p>This script performed the operation of applying <a href="https://docs.python.org/3/library/stdtypes.html#str.rstrip" rel="nofollow">rstrip()</a> to all lines in a file three consecutive times. This a case of belt, suspenders and a safety pin. Only one such operation is required. Let's pick one possibly dependent on the size of the input file.</p>
<p>I suggest using <a href="https://docs.python.org/3/library/timeit.html" rel="nofollow">timeit </a>to determine which method has the best performance and under what circumstance each may be required in order to perform successfully for files up to some maximum size.</p>
<p>The aforementioned maximum size needs to be established.</p>
<p>I am willing to offer a patch.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany/issues/2897">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAIOWJ5HOW7D5BSEFECJSQTUCFWQJANCNFSM5ED3FJPQ">unsubscribe</a>.<br />Triage notifications on the go with GitHub Mobile for <a href="https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675">iOS</a> or <a href="https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub">Android</a>.
<img src="https://github.com/notifications/beacon/AAIOWJ5GKAAFEEOD4SVMM6LUCFWQJA5CNFSM5ED3FJP2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4O3YRZ7Q.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/geany/geany/issues/2897",
"url": "https://github.com/geany/geany/issues/2897",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>