From 3788a5c58187fe6969167a46ee4b4b6e9f76d496 Mon Sep 17 00:00:00 2001 From: Aminda Suomalainen Date: Sat, 21 Oct 2023 10:10:56 +0300 Subject: [PATCH] move black configuration from .pre-commit-config.yaml to pyproject.toml --- .pre-commit-config.yaml | 3 ++- pyproject.toml | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 pyproject.toml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9ed22ef..856f56c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -86,7 +86,8 @@ repos: rev: 23.10.0 hooks: - id: black - args: ["--line-length", "79", "--target-version", "py310"] + #Refer to pyproject.toml + #args: ["--line-length", "79", "--target-version", "py310"] #- id: black-jupyter - repo: https://github.com/scop/pre-commit-shfmt rev: v3.7.0-1 diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..2a2b459 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,22 @@ +# When changing this file, read also .pre-commit-config.yaml + +[tool.black] +line-length = 79 +target-version = ['py310'] + +[tool.mypy] +#python-executable = 'pypy3' +python-version = 3.10 + +# https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html + +# No need to have it uncommented since 79 is the standard. +#[tool.pylint.format] +#max-line-length = 79 + +# Not actually used here, see .pre-commit-config.yaml for reorder-python-imports +# that does the same thing. +#[tool.isort] +#profile = "black" + +# copy-pasted comments end.