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 +