top | item 36122869

(no title)

seedie | 2 years ago

FWIW, whitespace changes can easily be filtered out in Github's PR view.

discuss

order

robertlagrant|2 years ago

It's a mistake to filter out whitespace changes on Python diffs. These days it's best use `Black --check` or similar in CI to make sure they've matched your whitespace settings, to minimise these changes.

akx|2 years ago

Sure. The link above is in "hide whitespace" mode (`?w=1`), and there are still visible whitespace changes (new or removed whitespace lines).

dingledork69|2 years ago

Like 3 of them. Is that problematic enough that you cannot review the rest of the code? My eye just slides over them.

DarkPlayer|2 years ago

I am working on a GitHub pull request viewer that displays changes using a semantic diff, and therefore has some more advanced whitespace handling behavior than just ignoring leading or trailing whitespace. I tried it with this PR:

https://app.semanticdiff.com/django-money/django-money/pull/...

It doesn't make a huge difference, but it filters out changes like the added line break in "if value: value = str(value)" nicely. I haven't announced the project yet, but maybe someone will find it useful :-)