From 973714b1edcad57eb888bd5c83a50ad5b9d8ae39 Mon Sep 17 00:00:00 2001 From: Jacob Bieker Date: Fri, 29 Oct 2021 10:16:59 +0100 Subject: [PATCH] Update precommit hooks with all linters --- .github/workflows/linters.yaml | 9 +++++++++ .pre-commit-config.yaml | 30 +++++++++++++++++++++++++++++- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/linters.yaml diff --git a/.github/workflows/linters.yaml b/.github/workflows/linters.yaml new file mode 100644 index 00000000..af8c8d4b --- /dev/null +++ b/.github/workflows/linters.yaml @@ -0,0 +1,9 @@ +name: Lint Python + +on: [push] + +jobs: + call-run-python-linters: + uses: openclimatefix/.github/.github/workflows/python-lint.yml@main + with: + folder: "satflow" diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d7fbadeb..35709d17 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -12,7 +12,35 @@ repos: - id: debug-statements - id: detect-private-key - # python code formatting + # python code formatting/linting + - repo: https://github.com/PyCQA/pydocstyle + rev: 6.1.1 + hooks: + - id: pydocstyle + args: + [ + --convention=google, + "--add-ignore=D200,D202,D210,D212,D415", + "satflow", + ] + - repo: https://github.com/PyCQA/flake8 + rev: 4.0.1 + hooks: + - id: flake8 + args: + [ + --max-line-length, + "100", + --extend-ignore=E203, + --per-file-ignores, + "__init__.py:F401", + "satflow", + ] + - repo: https://github.com/PyCQA/isort + rev: 5.9.3 + hooks: + - id: isort + args: [--profile, black, --line-length, "100", "satflow"] - repo: https://github.com/psf/black rev: 20.8b1 hooks: