From f3b1127cc20e5f71bdcc0af32c02c66bbfe89421 Mon Sep 17 00:00:00 2001 From: mikevhe18 Date: Sun, 4 Aug 2024 13:28:30 +0700 Subject: [PATCH] [CI] --- .github/workflows/pre-commit.yml | 9 ++++++--- .pre-commit-config.yaml | 7 ++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 57d6691..3a6b6ed 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -6,10 +6,13 @@ on: jobs: pre-commit: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 - uses: actions/setup-python@v2 + - name: Get python version + run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV + - uses: actions/cache@v1 with: - python-version: "3.9.7" - - uses: pre-commit/action@v2.0.0 + path: ~/.cache/pre-commit + key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 83dbd22..1f850aa 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -38,7 +38,7 @@ repos: - id: autoflake args: ["-i", "--ignore-init-module-imports"] - repo: https://github.com/psf/black - rev: 21.7b0 + rev: 22.3.0 hooks: - id: black - repo: https://github.com/pre-commit/mirrors-prettier @@ -80,9 +80,10 @@ repos: - id: mixed-line-ending args: ["--fix=lf"] - repo: https://github.com/asottile/pyupgrade - rev: v2.24.0 + rev: v2.7.2 hooks: - id: pyupgrade + args: ["--keep-percent-format"] - repo: https://github.com/PyCQA/isort rev: 5.9.3 hooks: @@ -100,7 +101,7 @@ repos: - requirements.txt - --header - "# generated from manifests external_dependencies" - - repo: https://gitlab.com/PyCQA/flake8 + - repo: https://github.com/PyCQA/flake8 rev: 3.9.2 hooks: - id: flake8