From 5191fb5d2c7a5e50d7caf7aeea26b017811d647d Mon Sep 17 00:00:00 2001 From: anton-climate Date: Mon, 22 Apr 2024 16:30:56 +1000 Subject: [PATCH 1/2] Pre-commit hook --- .pre-commit-config.yaml | 11 +++++++++++ pyproject.toml | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) 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..6c6869e --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,11 @@ +# See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks +repos: + - repo: local + hooks: + - id: black + name: black + entry: black + args: ['esmgrids', 'test'] + language: system + types: [python] \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 0eab91d..5f20e32 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,7 +32,6 @@ requires = [ "setuptools_scm[toml]", ] - [tool.setuptools] packages = ["esmgrids"] @@ -43,6 +42,7 @@ write_to = "esmgrids/_version.py" devel = [ "flake8", "black", + "pre-commit" ] test = [ "pytest", From 4510fa1257b8c96065de4d6f1d28e6ef29c1b780 Mon Sep 17 00:00:00 2001 From: anton-climate Date: Mon, 22 Apr 2024 16:48:06 +1000 Subject: [PATCH 2/2] tidy --- .pre-commit-config.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6c6869e..9b92a6c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,6 +6,5 @@ repos: - id: black name: black entry: black - args: ['esmgrids', 'test'] language: system types: [python] \ No newline at end of file