Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

How do you recommend fitting an autoformatter into a programming workflow? I'm using pycharm


Format on save. Failing that, format as part of your normal tox run. Failing that, pre-commit hook.


You can also add it to your CI, for black that seems to be `black --check`


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.


pycharm is a workflow now?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: