Re:Black – Uncompromising Python code formatter
by askvictor on Saturday May 18, 2019 @12:46AM
(#19945703)
How do you recommend fitting an autoformatter into a programming workflow? I'm using pycharm
[ Parent
| on HN ]
Re:Black – Uncompromising Python code formatter
by misterdoubt on Saturday May 18, 2019 @01:52AM
(#19945896)
Format on save. Failing that, format as part of your normal tox run. Failing that, pre-commit hook.
Re:Black – Uncompromising Python code formatter
by IanCal on Saturday May 18, 2019 @04:11AM
(#19946313)
You can also add it to your CI, for black that seems to be `black --check`
Re:Black – Uncompromising Python code formatter
by Ace17 on Saturday May 18, 2019 @06:23AM
(#19946657)
All my projects have a top-level 'check' script, which always does, in order:
- reformat the whole codebase
- build (if needed, e.g a C++ project)
- run all tests
The programming workflow is then:
- edit code
- run the 'check' script
- repeat.