Skip to content

Commit

Permalink
fix: Change extend-excludes to force-excludes
Browse files Browse the repository at this point in the history
    Black does not honor patterns in --excludes when explicitly
    provided on the cli. This is problematic when used with
    pre-commit since pre-commit _always_ provides a list of files
    to act on.

    `--force-exclude` seems to act identically to `--extend-excludes`
    but also applies to cli arguments.

    See psf/black#438 for more background
  • Loading branch information
kdestin committed Apr 4, 2023
1 parent a62b2f7 commit 83b84fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion eng/black-pyproject.toml
@@ -1,6 +1,6 @@
[tool.black]
line-length = 120
extend-exclude = '''
force-exclude = '''
# Exclude some directories from formatting (note the slashes surrounding the pattern)
/(
azure/ai/ml/_restclient
Expand Down

0 comments on commit 83b84fc

Please sign in to comment.