From 6488737aeea07dac35e9263fdb465bf9a0f3f0d6 Mon Sep 17 00:00:00 2001 From: Matej Straka Date: Sun, 13 Oct 2024 23:56:49 +0200 Subject: [PATCH] ci: Add manual workflow trigger --- .github/workflows/pre-commit.yml | 4 +++ .pre-commit-config.yaml | 46 +++++++++++++++++++++++++++----- 2 files changed, 43 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 1c6e309..e6691ef 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -3,6 +3,8 @@ name: pre-commit hooks on: push: + workflow_dispatch: + jobs: test: runs-on: ubuntu-latest @@ -23,4 +25,6 @@ jobs: - name: Run pre-commit hooks run: | + pre-commit clean + pre-commit install --install-hooks pre-commit run --all-files diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8bfe526..1f5960c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,19 +16,51 @@ repos: rev: v0.6.9 hooks: - id: ruff - args: ["--select", "E", "--select", "F", "--select", "I", - "--fix", - "--line-length", "120", - "--exclude", "tests/", "--exclude", "examples/" - ] + args: + [ + "--select", + "E", + "--select", + "F", + "--select", + "I", + "--fix", + "--line-length", + "120", + "--exclude", + "tests/", + "--exclude", + "examples/", + ] - id: ruff-format - args: ["--line-length", "120", "--exclude", "tests/", "--exclude", "examples/"] + args: + [ + "--line-length", + "120", + "--exclude", + "tests/", + "--exclude", + "examples/", + ] - repo: local hooks: - id: mypy name: mypy - entry: mypy --exclude 'examples/' --exclude 'tests/' --exclude 'generals/agents/' --disable-error-code "annotation-unchecked" . + entry: mypy . + args: + [ + --exclude, + "examples/", + --exclude, + "tests/", + --exclude, + "generals/agents/", + --disable-error-code, + "annotation-unchecked", + --follow-imports, + "silent", + ] pass_filenames: false language: system types: [python]