From 09a3482ba6d7ccadcc811d5ecc9e7f4ef09da7ba Mon Sep 17 00:00:00 2001 From: Dorian Turba <froggit.commit.z3jqj@simplelogin.com> Date: Sat, 8 Jul 2023 11:02:47 +0200 Subject: [PATCH] more documentation in README.md --- python/code_quality/black/README.md | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/python/code_quality/black/README.md b/python/code_quality/black/README.md index 91cac5c..f8c179c 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 -- GitLab