From 83b84fc2880cc880a833093815f9375fdd05dc7d Mon Sep 17 00:00:00 2001 From: kdestin <101366538+kdestin@users.noreply.github.com> Date: Tue, 4 Apr 2023 18:51:05 -0400 Subject: [PATCH] fix: Change `extend-excludes` to `force-excludes` 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 https://github.com/psf/black/issues/438 for more background --- eng/black-pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/black-pyproject.toml b/eng/black-pyproject.toml index 30e6cdc1416e..2d3e3800d647 100644 --- a/eng/black-pyproject.toml +++ b/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