From c7552ae8cbd4006649db9b581f4d1512be6429e7 Mon Sep 17 00:00:00 2001 From: Abolfazl Ranjbaran <206173650+Abolfazlrwm@users.noreply.github.com> Date: Sat, 14 Nov 2026 06:30:53 +0000 Subject: [PATCH] ci: lint training and benchmarks too Both directories are ruff-clean now; keeping them in the lint scope stops the scripts from rotting. Notebooks are excluded from ruff because Jupyter cells follow shell-magic and #@param conventions instead of repo style. --- .github/workflows/ci.yml | 3 +++ ruff.toml | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 17d2a0d..0eb9174 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,6 +34,9 @@ jobs: run: | dirs="backend" if [ -d bot ]; then dirs="$dirs bot"; fi + for extra in training benchmarks; do + if [ -d "$extra" ]; then dirs="$dirs $extra"; fi + done ruff check $dirs - name: Type check (mypy) if: ${{ hashFiles('backend/sokhan/**/*.py') != '' }} diff --git a/ruff.toml b/ruff.toml index 8122b40..419ac22 100644 --- a/ruff.toml +++ b/ruff.toml @@ -1,6 +1,10 @@ line-length = 100 target-version = "py310" +# Jupyter/Colab cells follow notebook conventions (shell magics, #@param +# pragmas, imports mid-cell), not the repo's Python style. +extend-exclude = ["*.ipynb"] + [lint] select = ["E", "F", "I", "W", "UP", "B"] ignore = ["B008"]