From 0c239f7ce0b255fb4444ccda3c768cb9d5c44584 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= <6774676+eumiro@users.noreply.github.com> Date: Sun, 27 Dec 2020 12:29:32 +0100 Subject: [PATCH] extend pre-commit --- .github/workflows/pre-commit.yml | 2 +- .pre-commit-config.yaml | 64 +++++++++++++++++++++----------- 2 files changed, 43 insertions(+), 23 deletions(-) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 418fe72..b52d4af 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -11,4 +11,4 @@ jobs: steps: - uses: actions/checkout@v2 - uses: actions/setup-python@v2 - - uses: pre-commit/action@v2.0.0 \ No newline at end of file + - uses: pre-commit/action@v2.0.0 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8a126d8..7ee5c5d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,39 +1,59 @@ +default_language_version: + python: python3 repos: -- repo: https://github.com/mgedmin/check-python-versions + - repo: https://github.com/mgedmin/check-python-versions rev: 0.17.0 hooks: - - id: check-python-versions -- repo: https://github.com/pre-commit/pre-commit-hooks + - id: check-python-versions + - repo: https://github.com/pre-commit/pre-commit-hooks rev: v3.4.0 hooks: - - id: debug-statements -- repo: https://github.com/psf/black - rev: 20.8b1 - hooks: - - id: black - language_version: python3.9 -- repo: https://gitlab.com/pycqa/flake8 - rev: 3.8.4 - hooks: - - id: flake8 - additional_dependencies: - - flake8-click==0.3.1 - - flake8-bugbear==20.1.4 -- repo: https://github.com/PyCQA/isort.git + - id: trailing-whitespace + - id: end-of-file-fixer + - id: fix-encoding-pragma + args: [--remove] + - id: check-ast + - id: check-yaml + - id: check-case-conflict + - id: check-docstring-first + - id: check-merge-conflict + - id: debug-statements + - repo: https://github.com/PyCQA/isort.git rev: 5.6.4 hooks: - - id: isort + - id: isort args: - -m3 - --tc -- repo: https://github.com/PyCQA/bandit + - repo: https://github.com/asottile/pyupgrade + rev: v2.7.3 + hooks: + - id: pyupgrade + args: [--py36-plus] + - repo: https://github.com/pre-commit/pygrep-hooks + rev: v1.7.0 + hooks: + - id: python-no-eval + - id: python-check-blanket-noqa + - id: rst-backticks + - repo: https://github.com/psf/black + rev: 20.8b1 + hooks: + - id: black + args: [--safe, --quiet, --target-version=py36] + - repo: https://github.com/PyCQA/bandit rev: 1.7.0 hooks: - - id: bandit + - id: bandit args: - --skip - B101 -- repo: https://github.com/tox-dev/tox-ini-fmt + - repo: https://gitlab.com/pycqa/flake8 + rev: 3.8.4 + hooks: + - id: flake8 + additional_dependencies: [flake8-bugbear] + - repo: https://github.com/tox-dev/tox-ini-fmt rev: 0.5.0 hooks: - - id: tox-ini-fmt + - id: tox-ini-fmt