From 1b2479be693a6cd8c28b792d8e19a510e9e55bdb Mon Sep 17 00:00:00 2001 From: Alex Waygood Date: Sat, 13 Jun 2026 15:49:27 +0100 Subject: [PATCH] Set `tool.black.exclude` so that `stdlib/venv` is not excluded when "manually" invoking Black --- pyproject.toml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index b2b851541d4f..c3a4fe66b780 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,9 +11,28 @@ target-version = ["py310"] skip-magic-trailing-comma = true preview = true +# Override `exclude` so that the `stdlib/venv` directory is not excluded +# if you invoke Black "manually" (not using pre-commit). `venv` is one of +# the directories that Black excludes by default if `tool.black.exclude` +# is not set. See https://black.readthedocs.io/en/stable/usage_and_configuration/the_basics.html#exclude +exclude = ''' +/( + \.env| + \.venv| + env| + \.git| + \.mypy_cache +)/ +''' + [tool.ruff] line-length = 130 fix = true + +# Override `exclude` so that the `stdlib/venv` directory is not excluded +# if you invoke Ruff "manually" (not using pre-commit). `venv` is one of +# the directories that Ruff excludes by default if `tool.ruff.exclude` +# is not set. See https://docs.astral.sh/ruff/configuration/ exclude = [ # virtual environment ".env",