From a774182c05731797cfe3353ff9618c0cd80b6f35 Mon Sep 17 00:00:00 2001 From: Eliah Kagan Date: Tue, 19 Sep 2023 09:02:52 -0400 Subject: [PATCH] Fix black exclusions to omit .gitignore dirs This replaces "exclude" with "extend-exclude" in the black configuration, so that it keeps its default exclusions, of which all directories listed in .gitignore are automatically a part. That makes it possible to run "black ." to format just the files that should be formatted (git/ files, test/ files, and setup.py), while automatically omitting .venv/, .tox/, build/, and so on. This commit does not change how black is run yet, it just fixes the way its exclusions are configured. --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 42bb31eda..fa06458eb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -45,4 +45,4 @@ omit = ["*/git/ext/*"] [tool.black] line-length = 120 target-version = ['py37'] -exclude = "git/ext/gitdb" +extend-exclude = "git/ext/gitdb"