From 48474d4645f5a1206929ba387130701c06e8bca6 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Wed, 15 Nov 2023 22:01:47 -0800 Subject: [PATCH] Configure Black in pyproject.toml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This way Black uses the project’s settings when invoked directly by the user or their editor, and not only via pre-commit. Signed-off-by: Anders Kaseorg --- .pre-commit-config.yaml | 4 +--- pyproject.toml | 3 +++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d998c33..f387f35 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -34,9 +34,7 @@ repos: - repo: https://github.com/psf/black rev: 23.11.0 hooks: - - name: black - id: black - args: ["--line-length", "79"] + - id: black - repo: https://github.com/pre-commit/mirrors-prettier rev: "v3.1.0" hooks: diff --git a/pyproject.toml b/pyproject.toml index 1760316..e87ac9f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -36,6 +36,9 @@ Issues = "https://github.com/crate-py/rpds/issues/" Funding = "https://github.com/sponsors/Julian" Source = "https://github.com/crate-py/rpds" +[tool.black] +line-length = 79 + [tool.isort] combine_as_imports = true from_first = true