From 159fc75c794866c67b8fac1e8144fdb3878fc60d Mon Sep 17 00:00:00 2001 From: Mark90 Date: Thu, 2 Jan 2025 12:44:39 +0100 Subject: [PATCH] Run pre-commit hooks in CI --- .github/workflows/test-package.yml | 11 ++--------- .pre-commit-config.yaml | 4 +--- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/.github/workflows/test-package.yml b/.github/workflows/test-package.yml index 4d30855..7e28c66 100644 --- a/.github/workflows/test-package.yml +++ b/.github/workflows/test-package.yml @@ -25,18 +25,11 @@ jobs: python -m pip install --upgrade pip pip install flit flit install --deps develop - - name: Check formatting - run: | - black --check . - - name: Lint with ruff - run: | - ruff check . - - name: MyPy - run: | - mypy -p oauth2_lib - name: License headers run: | apache-license-check --copyright "2019-`date +%Y` SURF" oauth2_lib + - name: Run pre-commit hooks + uses: pre-commit/action@v3.0.1 - name: Test with pytest run: | mkdir reports diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 91d177b..53515d0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -10,7 +10,6 @@ repos: rev: 24.10.0 hooks: - id: black - language_version: python3.11 - repo: https://github.com/asottile/blacken-docs rev: 1.19.1 hooks: @@ -39,8 +38,7 @@ repos: rev: v1.14.1 hooks: - id: mypy - language_version: python3.11 - additional_dependencies: [pydantic<2.0.0, strawberry-graphql] + additional_dependencies: [strawberry-graphql] args: - --no-warn-unused-ignores - --allow-untyped-decorators