You can automate black by using pre-commit hooks. These hooks will make sure that black is run on every single commit. Automation is great!
The pre-commit config file will look like this;
repos:
- repo: https://github.com/psf/black
rev: stable
hooks:
- id: black
language_version: python3.6
If you're interested in learning more about these; we've got a series of videos on pre-commit hooks.