From 1f1649ec038cf52019cac20ba39c3859ecfcbf38 Mon Sep 17 00:00:00 2001 From: Jarrod Millman Date: Tue, 24 Dec 2024 10:02:04 -0800 Subject: [PATCH] Use pre-commit bot --- .github/workflows/lint.yml | 27 --------------------------- .pre-commit-config.yaml | 6 ++++++ 2 files changed, 6 insertions(+), 27 deletions(-) delete mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index 24005ac..0000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: lint - -on: [push, pull_request] - -jobs: - format: - runs-on: ${{ matrix.os }}-latest - strategy: - matrix: - os: [ubuntu] - python-version: ["3.11"] - - steps: - - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - cache: "pip" - - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install .[lint] - - - name: Lint - run: pre-commit run --all-files --show-diff-on-failure --color always diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e635314..99d48e3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,12 @@ # Install pre-commit hooks via # pre-commit install +ci: + autofix_prs: false + autofix_commit_msg: | + '[pre-commit.ci 🤖] Apply code format tools to PR' + autoupdate_schedule: quarterly + repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: cef0300fd0fc4d2a87a85fa2093c6b283ea36f4b # frozen: v5.0.0