3 ms·
Here's the best thing about Black: Python has significant whitespace, so you can't just click "ignore whitespace changes" in Github diffs and it doesn't matter
by robertlagrant 5y ago
Here's the best thing about Black:
Python has significant whitespace, so you can't just click "ignore whitespace changes" in Github diffs and it doesn't matter. You have to put up with every silly whitespace change.
Until Black.
- robertlagrant 5y ago5 upvotes generate a pro tip: have your CI run black --check against the code you want formatted. That way different devs can run the formatting how they like (in tox; in a pre-commit hook; in IDE; on the command line) and CI just enforces that it happened.
- CyberShadow 5y agoUnfortunately Black will reformat code which has only been indented/outdented, causing false diffs even with "ignore whitespace changes".
- deleted 5y ago[deleted]
- robertlagrant 5y agoThat's true. What I mean is it won't keep being reformatted when everyone runs their own formatter on the code before they start working on it.