From b7c3a9fedd4cfcc6a6a88aacc7b0f599b63d4716 Mon Sep 17 00:00:00 2001 From: Dragorn421 Date: Thu, 11 Jan 2024 16:46:17 +0100 Subject: [PATCH] Docs: Add note on `--exclude` about possibly verbose regex (#4145) Co-authored-by: Jelle Zijlstra --- docs/usage_and_configuration/the_basics.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/usage_and_configuration/the_basics.md b/docs/usage_and_configuration/the_basics.md index 4f9856c..b541f07 100644 --- a/docs/usage_and_configuration/the_basics.md +++ b/docs/usage_and_configuration/the_basics.md @@ -268,6 +268,11 @@ recursive searches. An empty value means no paths are excluded. Use forward slas directories on all platforms (Windows, too). By default, Black also ignores all paths listed in `.gitignore`. Changing this value will override all default exclusions. +If the regular expression contains newlines, it is treated as a +[verbose regular expression](https://docs.python.org/3/library/re.html#re.VERBOSE). This +is typically useful when setting these options in a `pyproject.toml` configuration file; +see [Configuration format](#configuration-format) for more information. + #### `--extend-exclude` Like `--exclude`, but adds additional files and directories on top of the default values