From a6cfdbd79342a5a40439e4a22ed372a4869e1423 Mon Sep 17 00:00:00 2001 From: Caroline Malin-Mayor Date: Wed, 14 Feb 2024 10:29:17 -0500 Subject: [PATCH] Add pre-commit config --- .pre-commit-config.yaml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 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 00000000..169439dd --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,38 @@ +ci: + autoupdate_schedule: monthly + autofix_commit_msg: "style(pre-commit.ci): auto fixes [...]" + autoupdate_commit_msg: "ci(pre-commit.ci): autoupdate" + +default_install_hook_types: [pre-commit, commit-msg] + +repos: + # - repo: https://github.com/compilerla/conventional-pre-commit + # rev: v2.1.1 + # hooks: + # - id: conventional-pre-commit + # stages: [commit-msg] + + - repo: https://github.com/charliermarsh/ruff-pre-commit + rev: v0.2.1 + hooks: + - id: ruff + args: [--fix] + + - repo: https://github.com/psf/black + rev: 24.2.0 + hooks: + - id: black + + - repo: https://github.com/abravalheri/validate-pyproject + rev: v0.16 + hooks: + - id: validate-pyproject + + - repo: https://github.com/pre-commit/mirrors-mypy + rev: v1.8.0 + hooks: + - id: mypy + files: "^src/" + # # you have to add the things you want to type check against here + # additional_dependencies: + # - numpy