diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index a44a6abf1..9035d0692 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -1,23 +1,14 @@ name: pre-commit on: - workflow_dispatch: pull_request: push: - branches: [master] + branches: [main] jobs: - pre-commit: - runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - uses: actions/setup-python@v2 - - name: set PY - run: echo "PY=$(python --version --version | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV - - uses: actions/cache@v1 - with: - path: ~/.cache/pre-commit - key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }} - - uses: pre-commit/action@v1.0.0 + - uses: pre-commit/action@v2.0.3 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 40b5d88a4..3318faa8d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,11 +1,11 @@ repos: - repo: https://github.com/psf/black - rev: 21.9b0 + rev: 21.12b0 hooks: - id: black args: [--safe, --quiet, --line-length=100] - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.0.1 + rev: v4.1.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer @@ -20,13 +20,13 @@ repos: rev: v1.1 hooks: - id: autoflake - args: [--in-place, --remove-all-unused-imports, --remove-unused-variable] + args: [--in-place, --remove-unused-variable, --remove-all-unused-imports] - repo: https://github.com/asottile/reorder_python_imports - rev: v2.6.0 + rev: v2.7.1 hooks: - id: reorder-python-imports - repo: https://github.com/asottile/pyupgrade - rev: v2.29.0 + rev: v2.31.0 hooks: - id: pyupgrade args: [--py36-plus] @@ -36,11 +36,11 @@ repos: - id: flake8 args: [--max-line-length=100] - repo: https://github.com/asottile/setup-cfg-fmt - rev: v1.18.0 + rev: v1.20.0 hooks: - id: setup-cfg-fmt - repo: https://github.com/pocc/pre-commit-hooks - rev: v1.3.4 + rev: v1.3.5 hooks: - id: clang-format args: [-i]