From d00d16fbba42441e90310e01935eb1f5a740dbdc Mon Sep 17 00:00:00 2001 From: Micael Oliveira Date: Thu, 9 May 2024 13:53:39 +1000 Subject: [PATCH] Add git pre-commit hook. --- .pre-commit-config.yaml | 8 ++++++++ pyproject.toml | 1 + 2 files changed, 9 insertions(+) create mode 100644 .pre-commit-config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..6394f57 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,8 @@ +# See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks +repos: + - repo: https://github.com/psf/black + rev: 24.4.0 + hooks: + - id: black + language_version: python3 diff --git a/pyproject.toml b/pyproject.toml index 592ef96..4e75848 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,6 +26,7 @@ write_to = "om3utils/_version.py" devel = [ "flake8", "black", + "pre-commit", ] test = [ "pytest",