diff --git a/python/code_quality/black/README.md b/python/code_quality/black/README.md index 91cac5cf83f1f0ff9101c2c6fd84238cc15b4109..f8c179c940cf88ce8401dd12d113f5ed4abf3ff0 100644 --- a/python/code_quality/black/README.md +++ b/python/code_quality/black/README.md @@ -2,8 +2,22 @@ ## Objective -Run the [Black code formatter](https://github.com/psf/black) on your Python code to ensure it -complies with the coding style guide. +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