diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..6c5049e --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,10 @@ +version: 2 +updates: + - package-ecosystem: github-actions + directory: / + schedule: + interval: weekly + groups: + github-actions: + patterns: + - "*" diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index aa16324..8b97a39 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -6,6 +6,8 @@ on: repository_dispatch: types: [pypi_release] +permissions: {} + jobs: build: name: main @@ -16,10 +18,12 @@ jobs: - if: ${{ startsWith(github.event_name, 'repository_dispatch') }} run: sleep 30 - - uses: actions/checkout@v4 + - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + with: + persist-credentials: true # needed to push commits below - name: Install uv - uses: astral-sh/setup-uv@v5 + uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867 # v7.1.6 - name: set git config run: | diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml index 491cc71..4d17023 100644 --- a/.pre-commit-hooks.yaml +++ b/.pre-commit-hooks.yaml @@ -1,6 +1,6 @@ -- id: ruff - name: ruff - description: "Run 'ruff' for extremely fast Python linting" +- id: ruff-check + name: ruff check + description: "Run 'ruff check' for extremely fast Python linting" entry: ruff check --force-exclude language: python types_or: [python, pyi, jupyter] @@ -10,7 +10,7 @@ minimum_pre_commit_version: "2.9.2" - id: ruff-format - name: ruff-format + name: ruff format description: "Run 'ruff format' for extremely fast Python formatting" entry: ruff format --force-exclude language: python @@ -19,3 +19,15 @@ require_serial: true additional_dependencies: [] minimum_pre_commit_version: "2.9.2" + +# Legacy alias +- id: ruff + name: ruff (legacy alias) + description: "Run 'ruff check' for extremely fast Python linting" + entry: ruff check --force-exclude + language: python + types_or: [python, pyi, jupyter] + args: [] + require_serial: true + additional_dependencies: [] + minimum_pre_commit_version: "2.9.2" diff --git a/README.md b/README.md index adfe482..908b4b7 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ # ruff-pre-commit [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff) -[![image](https://img.shields.io/pypi/v/ruff/0.11.9.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/l/ruff/0.11.9.svg)](https://pypi.python.org/pypi/ruff) -[![image](https://img.shields.io/pypi/pyversions/ruff/0.11.9.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/v/ruff/0.14.10.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/l/ruff/0.14.10.svg)](https://pypi.python.org/pypi/ruff) +[![image](https://img.shields.io/pypi/pyversions/ruff/0.14.10.svg)](https://pypi.python.org/pypi/ruff) [![Actions status](https://github.com/astral-sh/ruff-pre-commit/workflows/main/badge.svg)](https://github.com/astral-sh/ruff-pre-commit/actions) A [pre-commit](https://pre-commit.com/) hook for [Ruff](https://github.com/astral-sh/ruff). @@ -20,10 +20,10 @@ To run Ruff's [linter](https://docs.astral.sh/ruff/linter) and [formatter](https repos: - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.11.9 + rev: v0.14.10 hooks: # Run the linter. - - id: ruff + - id: ruff-check # Run the formatter. - id: ruff-format ``` @@ -34,10 +34,10 @@ To enable lint fixes, add the `--fix` argument to the lint hook: repos: - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.11.9 + rev: v0.14.10 hooks: # Run the linter. - - id: ruff + - id: ruff-check args: [ --fix ] # Run the formatter. - id: ruff-format @@ -49,10 +49,10 @@ To avoid running on Jupyter Notebooks, remove `jupyter` from the list of allowed repos: - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.11.9 + rev: v0.14.10 hooks: # Run the linter. - - id: ruff + - id: ruff-check types_or: [ python, pyi ] args: [ --fix ] # Run the formatter. diff --git a/pyproject.toml b/pyproject.toml index e1f37e4..aaf6e19 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,5 +2,5 @@ name = "ruff-pre-commit" version = "0.0.0" dependencies = [ - "ruff==0.11.9", + "ruff==0.14.10", ]