From 5a0e70158ed13a534d11d14c8214a24da8eff7ba Mon Sep 17 00:00:00 2001 From: Yusuke Nishioka Date: Thu, 12 May 2022 15:11:36 +0900 Subject: [PATCH 1/3] Add more examples to exclude files in addition to the defaults --- docs/usage_and_configuration/the_basics.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/usage_and_configuration/the_basics.md b/docs/usage_and_configuration/the_basics.md index 4c793f459a2..5c13a00cbc3 100644 --- a/docs/usage_and_configuration/the_basics.md +++ b/docs/usage_and_configuration/the_basics.md @@ -259,10 +259,14 @@ expressions by Black. Use `[ ]` to denote a significant space character. line-length = 88 target-version = ['py37'] include = '\.pyi?$' +# 'extend-exclude' excludes files or directories in addition to the defaults extend-exclude = ''' # A regex preceded with ^/ will apply only to files and directories # in the root of the project. -^/foo.py # exclude a file named foo.py in the root of the project (in addition to the defaults) +( + ^/foo.py # exclude a file named foo.py in the root of the project + | *.py.bak # exclude a file with '.py.bak' suffix within the project +) ''' ``` From 9a6f5411a4424e1152c214612df15235153aa0b9 Mon Sep 17 00:00:00 2001 From: Yusuke Nishioka Date: Fri, 13 May 2022 07:28:02 +0900 Subject: [PATCH 2/3] Update excluded files in the example --- docs/usage_and_configuration/the_basics.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/usage_and_configuration/the_basics.md b/docs/usage_and_configuration/the_basics.md index 5c13a00cbc3..1deb4b749e2 100644 --- a/docs/usage_and_configuration/the_basics.md +++ b/docs/usage_and_configuration/the_basics.md @@ -265,7 +265,7 @@ extend-exclude = ''' # in the root of the project. ( ^/foo.py # exclude a file named foo.py in the root of the project - | *.py.bak # exclude a file with '.py.bak' suffix within the project + | *_pb2.py # exclude an auto-generated file by Protocol Buffer within the project ) ''' ``` From 5b75ef3d8af5eaee4d00d2fc321b491379182c27 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Thu, 26 May 2022 07:31:55 -0700 Subject: [PATCH 3/3] Update docs/usage_and_configuration/the_basics.md --- docs/usage_and_configuration/the_basics.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/usage_and_configuration/the_basics.md b/docs/usage_and_configuration/the_basics.md index 1deb4b749e2..c7e2d4a4dde 100644 --- a/docs/usage_and_configuration/the_basics.md +++ b/docs/usage_and_configuration/the_basics.md @@ -265,7 +265,7 @@ extend-exclude = ''' # in the root of the project. ( ^/foo.py # exclude a file named foo.py in the root of the project - | *_pb2.py # exclude an auto-generated file by Protocol Buffer within the project + | *_pb2.py # exclude autogenerated Protocol Buffer files anywhere in the project ) ''' ```