ci: add Python CI job (ruff, mypy, pytest) for the llm-abstraction package (#2364)

* ci: add ruff + mypy to the Python CI job and fix pyproject tool config

The python-tests job runs pytest but not lint/type checks, and the ruff
and mypy configuration in pyproject.toml was silently broken, so neither
tool could run at all.

- add ruff and mypy steps to the existing python-tests job
- fix invalid pyproject keys: [tool.ruff] src-path -> src,
  [tool.mypy] src_paths -> mypy_path
- ignore ruff UP042 (the (str, Enum) mixin is intentional)
- resolve ruff findings (unused/unsorted imports) across src and tests
- fix mypy errors in tools/executor.py and prompt/builder.py

* fix(ci): satisfy Python lint after main refresh

---------

Co-authored-by: haelyra <49814733+haelyra@users.noreply.github.com>
This commit is contained in:
Etisam Ul Haq
2026-08-11 14:15:57 -04:00
committed by GitHub
co-authored by haelyra
parent 74ffba6d4f
commit a15c8e8533
19 changed files with 121 additions and 45 deletions
+7 -1
View File
@@ -172,7 +172,7 @@ jobs:
continue-on-error: false
python-tests:
name: Python Tests
name: Python Lint, Type Check & Test
runs-on: ubuntu-latest
timeout-minutes: 10
@@ -190,6 +190,12 @@ jobs:
- name: Install Python dependencies
run: python -m pip install --upgrade pip && python -m pip install -e '.[dev]'
- name: Run ruff (lint)
run: python -m ruff check src tests
- name: Run mypy (type check)
run: python -m mypy src
- name: Run Python tests
run: python -m pytest tests/test_*.py -m "not integration"