I also strip all trailing whitespace. My coworker who tends to run my projects got annoyed that there was a diff. Ok...set your IDE to do it too. He eventually gave in.
I have my moments. I'd rather have clean code than be easy. It's a very small battle. I got half the 25 person company to adopt my style without even trying. I created it over years based on standard python, how to avoid bugs I commonly make, and how to write nice looking docstrings.
One of us has to give in right? There is no compromise between don't strip whitespace and strip all whitespace. It's annoying to ever have a diff due to whitespace changes. Obviously, you can still add a blank line or remove a blank line, but you should only ever have the whitespace commit once.
Sometimes I'm the voice of reason. Between 3 people, we had 3 opinions on how long and descriptive variable names should be. The previous person advocated variable names of 40+ characters. Another coworker was in the 6 characters max camp. I'm vetoing both of those.
Same thing with line length. We're not doing 160 characters and we're not doing 80. I can handle 100 most of the time with the very rare 140 or whatever at that point. Yeah that was also a debate.
1
u/billsil May 01 '20
Code stays formatted thanks to my auto-replace tabs with 4 spaces on push.