From b7828625904d004c843e9557aaee3b2e75f2ee85 Mon Sep 17 00:00:00 2001 From: ryanmerolle Date: Thu, 2 Feb 2023 21:53:25 +0000 Subject: [PATCH] update pre-commit & sourcery --- .devcontainer/requirements-dev.txt | 1 + .pre-commit-config.yaml | 23 +++++++++++++++++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/.devcontainer/requirements-dev.txt b/.devcontainer/requirements-dev.txt index 13a832d..d4a50d5 100644 --- a/.devcontainer/requirements-dev.txt +++ b/.devcontainer/requirements-dev.txt @@ -12,3 +12,4 @@ pylint pylint-django wily yapf +sourcery-analytics diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9ebc05c..374cc10 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,16 +14,18 @@ repos: - id: requirements-txt-fixer - id: trailing-whitespace - repo: https://github.com/PyCQA/isort - rev: 5.11.4 + rev: 5.12.0 hooks: - id: isort args: - "--profile=black" + exclude: ^.devcontainer/ - repo: https://github.com/psf/black - rev: 22.12.0 + rev: 23.1.0 hooks: - id: black language_version: python3 + exclude: ^.devcontainer/ - repo: https://github.com/asottile/add-trailing-comma rev: v2.4.0 hooks: @@ -34,6 +36,7 @@ repos: rev: 6.0.0 hooks: - id: flake8 + exclude: ^.devcontainer/ - repo: https://github.com/asottile/pyupgrade rev: v3.3.1 hooks: @@ -44,6 +47,12 @@ repos: rev: v1.29.0 hooks: - id: yamllint + - repo: https://github.com/econchick/interrogate + rev: 1.5.0 + hooks: + - id: interrogate + args: [--fail-under=90, --verbose] + exclude: (^.devcontainer/|^netbox_acls/migrations/) #- repo: https://github.com/Lucas-C/pre-commit-hooks-nodejs # rev: v1.1.2 # hooks: @@ -61,3 +70,13 @@ repos: # verbose: true # language: python # additional_dependencies: [wily] + #- repo: https://github.com/sourcery-ai/sourcery + # rev: v1.0.4b23 + # hooks: + # - id: sourcery + # # The best way to use Sourcery in a pre-commit hook: + # # * review only changed lines: + # # * omit the summary + # args: + # - --diff=git diff HEAD + # - --no-summary