From b2a5d0b2be78c808bec609e31a6dfe0406a4430a Mon Sep 17 00:00:00 2001 From: tillwenke Date: Sun, 26 Jan 2025 09:40:21 +0100 Subject: [PATCH] fix: setup ruff --- .github/workflows/ruff_linting.yml | 18 ++++++++++++++++++ ruff.toml | 21 +++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 .github/workflows/ruff_linting.yml create mode 100644 ruff.toml diff --git a/.github/workflows/ruff_linting.yml b/.github/workflows/ruff_linting.yml new file mode 100644 index 0000000..27b9623 --- /dev/null +++ b/.github/workflows/ruff_linting.yml @@ -0,0 +1,18 @@ +name: ruff linting +on: push +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Install Python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install ruff==0.9.3 + # Update output format to enable automatic inline annotations. + - name: Run Ruff + run: ruff check --output-format=github . \ No newline at end of file diff --git a/ruff.toml b/ruff.toml new file mode 100644 index 0000000..ee6e060 --- /dev/null +++ b/ruff.toml @@ -0,0 +1,21 @@ + +line-length = 130 + +[lint] +select = [ + # pycodestyle + "E", + # Pyflakes + "F", + # pyupgrade + "UP", + # flake8-bugbear + "B", + # flake8-simplify + "SIM", + # isort + "I" +] + +# could be extended to enforce type annotations and docstrings +