[](https://black.readthedocs.io/en/stable/) ## Objective Run [Black](https://github.com/psf/black) on your Python code to ensure it complies with the coding style guide. Black is configured with `--check --diff --quiet` rules. ### Global Configuration of Black To add configuration to `black` shared with any other usage of black (such as manual run, pre-commit, etc), you can use `pyproject.toml` configuration file. Learn more about [pyproject](https://pip.pypa.io/en/stable/reference/build-system/pyproject-toml/) configuration files. See this example: ```python [tool.black] line-length = 100 ``` ## How to use it 2. Include template in your CI/CD conf (see quick use above) 3. Customize the template if it's relevant ## Add <a href="https://github.com/psf/black"><img alt="Code style: black" src="https://img.shields.io/badge/code%20style-black-000000.svg"></a> cartouche to your project README.md ```markdown <a href="https://github.com/psf/black"> <img alt="Code style: black" src="https://img.shields.io/badge/code%20style-black-000000.svg"> </a> ```