From 21ffc736bcf6e95a6bab1c7d691e7a54756c0ddb Mon Sep 17 00:00:00 2001 From: "J.P. Krauss" Date: Thu, 14 Jul 2022 17:12:35 -0700 Subject: [PATCH] Add Pre-Commit Hooks --- .pre-commit-config.yaml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 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..b64d134 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,30 @@ +repos: + - repo: https://github.com/asottile/pyupgrade + rev: v2.7.4 + hooks: + - id: pyupgrade + args: [--py37-plus] + + - repo: https://github.com/codespell-project/codespell + rev: v2.0.0 + hooks: + - id: codespell + args: + - --ignore-words-list=sigl + - --skip="./.*,*.csv,*.json" + - --quiet-level=2 + exclude_types: [csv, json] + + - repo: https://gitlab.com/pycqa/flake8 + rev: 3.8.4 + hooks: + - id: flake8 + additional_dependencies: + - flake8-docstrings==1.5.0 + - pydocstyle==5.1.1 + files: ^(sigl|tests)/.+\.py$ + + - repo: https://github.com/PyCQA/isort + rev: 5.5.3 + hooks: + - id: isort