From a1d2e6b40a49ab47092b4f8f7da3860136fa40ef Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Sun, 29 Dec 2024 19:52:35 +0100 Subject: [PATCH 1/2] GitHub Actions: Lint Python code with Ruff https://docs.astral.sh/ruff is an extremely fast Python linter and code formatter, written in Rust. With [over 800 linting rules](https://docs.astral.sh/ruff/rules), ruff can be used to replace [Flake8](https://pypi.org/project/flake8/) (plus dozens of plugins), [Black](https://github.com/psf/black), [isort](https://pypi.org/project/isort/), [pydocstyle](https://pypi.org/project/pydocstyle/), [pyupgrade](https://pypi.org/project/pyupgrade/), [autoflake](https://pypi.org/project/autoflake/), and more, all while executing tens or hundreds of times faster than any individual tool. --- .github/workflows/ruff.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/workflows/ruff.yml diff --git a/.github/workflows/ruff.yml b/.github/workflows/ruff.yml new file mode 100644 index 000000000..2b9a12410 --- /dev/null +++ b/.github/workflows/ruff.yml @@ -0,0 +1,15 @@ +name: ruff +on: + push: + branches: + - 'main' + pull_request: + branches: + - 'main' +jobs: + ruff: + name: ruff + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: astral-sh/ruff-action@v2 From 4b4368d81eb6f05ee9cfc1d11bc193ffec60462c Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Sat, 4 Jan 2025 08:55:39 +0100 Subject: [PATCH 2/2] astral-sh/ruff-action@v3 --- .github/workflows/ruff.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ruff.yml b/.github/workflows/ruff.yml index 2b9a12410..4a739bd05 100644 --- a/.github/workflows/ruff.yml +++ b/.github/workflows/ruff.yml @@ -12,4 +12,4 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: astral-sh/ruff-action@v2 + - uses: astral-sh/ruff-action@v3