Skip to content

Commit

Permalink
Add more examples to exclude files in addition to the defaults (#3070)
Browse files Browse the repository at this point in the history
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
  • Loading branch information
ysk24ok and JelleZijlstra committed May 26, 2022
1 parent fdb01f8 commit 9fe788d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/usage_and_configuration/the_basics.md
Expand Up @@ -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
| *_pb2.py # exclude autogenerated Protocol Buffer files anywhere in the project
)
'''
```

Expand Down

0 comments on commit 9fe788d

Please sign in to comment.