diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml deleted file mode 100644 index c4a099df9..000000000 --- a/.github/workflows/style.yml +++ /dev/null @@ -1,66 +0,0 @@ -name: Code Style - -on: - push: - branches: [ "**" ] - tags-ignore: [ "**" ] - pull_request: - workflow_dispatch: - -jobs: - - black: - name: black - runs-on: ubuntu-latest - - steps: - - - name: "🔀 Checkout repository" - uses: actions/checkout@v4 - - - name: '🐍 Initialize Python' - uses: actions/setup-python@v5 - with: - python-version: "3.*" - - # Note: the black version needs to be in sync with what - # specified in setup.cfg. - - name: "📝 Black Code Formatter" - uses: psf/black@stable - with: - options: "--check --diff --color" - version: "~= 24.0" - - isort: - name: isort - runs-on: ubuntu-latest - - steps: - - - name: "🔀 Checkout repository" - uses: actions/checkout@v4 - - - name: '🐍 Initialize Python' - uses: actions/setup-python@v5 - with: - python-version: "3.*" - - # Workaround for https://github.com/isort/isort-action/issues/70 - - run: pip install colorama - - - name: "📝 isort" - uses: isort/isort-action@master - with: - configuration: "--check --diff --color" - - ruff: - name: ruff - runs-on: ubuntu-latest - - steps: - - - name: "🔀 Checkout repository" - uses: actions/checkout@v4 - - - name: "📝 Ruff" - uses: chartboost/ruff-action@v1 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2240dbd21..483464939 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,14 @@ +ci: + autofix_prs: false + autoupdate_schedule: quarterly + submodules: false + +default_language_version: + python: python3 + repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v4.6.0 hooks: - id: check-ast - id: check-merge-conflict @@ -9,19 +17,19 @@ repos: - id: trailing-whitespace - repo: https://github.com/psf/black-pre-commit-mirror - rev: 24.2.0 + rev: 24.4.2 hooks: - id: black - language_version: python3.11 + args: ["--check", "--diff"] - repo: https://github.com/pycqa/isort rev: 5.13.2 hooks: - id: isort - name: isort (python) + args: ["--check", "--diff"] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.3.2 + rev: v0.5.1 hooks: - id: ruff