From 9aa197cab9c4a96461e6ac28187159d7d6639137 Mon Sep 17 00:00:00 2001 From: Julien Moura Date: Wed, 31 May 2023 16:19:45 +0200 Subject: [PATCH 1/2] Add black config --- pyproject.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index a44b15f..a91d767 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,5 +56,9 @@ doc = [ requires = ["setuptools>=61.0.0", "wheel"] build-backend = "setuptools.build_meta" +[tool.black] +line-length = 100 +target-version = ['py38'] + [tool.setuptools.packages.find] where = ["src"] From 03bede2377ebcd1b3de248cc9b7daaf4eb0c8d5a Mon Sep 17 00:00:00 2001 From: Julien Moura Date: Wed, 31 May 2023 16:19:57 +0200 Subject: [PATCH 2/2] Add black git hook --- .pre-commit-config.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ddc5f9b..31a1cee 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -20,3 +20,8 @@ repos: args: [--pytest-test-first] - id: trailing-whitespace args: [--markdown-linebreak-ext=md] + + - repo: https://github.com/psf/black + rev: 23.3.0 + hooks: + - id: black