Skip to content

fix: correct tooling config mismatches and add CI lint workflow#22

Open
KuaaMU wants to merge 1 commit into
thinking-machines-lab:mainfrom
KuaaMU:feat/add-ci-and-fix-tooling
Open

fix: correct tooling config mismatches and add CI lint workflow#22
KuaaMU wants to merge 1 commit into
thinking-machines-lab:mainfrom
KuaaMU:feat/add-ci-and-fix-tooling

Conversation

@KuaaMU
Copy link
Copy Markdown

@KuaaMU KuaaMU commented Apr 30, 2026

Summary

This PR fixes the code quality tooling configuration mismatches and adds a CI workflow to enforce linting on every push/PR.

Problems Found

The project configured black, isort, and flake8 in pyproject.toml, but the tools were broken:

  1. black couldn't parse files: target-version = ['py38'] but code uses match/case (Python 3.10+)
  2. flake8 line-length mismatch: No config file → defaults to 79 chars while black uses 100
  3. Actual formatting violations: Trailing whitespace, missing newlines, long lines
  4. No CI: Tools configured but never enforced

Changes

Configuration Fixes

  • pyproject.toml: target-version py38 → py310, requires-python >=3.8 → >=3.10
  • .flake8: Add config with max-line-length = 100 to match black
  • pyproject.toml: Remove Python 3.8/3.9 classifiers (match/case requires 3.10+)

Code Formatting

  • Run black and isort on all Python files to fix existing violations

CI

  • Add .github/workflows/lint.yml that runs black, isort, and flake8 checks

Housekeeping

  • Add .gitignore for .venv/ and pycache/

Verification

All linters pass locally:

✅ black --check .
✅ isort --check .
✅ flake8 batch_invariant_ops/ test_batch_invariance.py deterministic_vllm_inference.py

Notes

- Fix pyproject.toml target-version from py38 to py310 (code uses match/case)
- Fix requires-python from >=3.8 to >=3.10 (match/case requires 3.10+)
- Add .flake8 config with max-line-length=100 to match black
- Run black/isort to fix existing formatting violations
- Add .github/workflows/lint.yml for CI lint checks
- Add .gitignore for .venv/ and __pycache__/

The project had black/isort/flake8 configured in pyproject.toml but:
1. black could not parse files due to py38 target with match/case syntax
2. flake8 defaulted to 79-char lines while black uses 100
3. No CI to enforce these checks

This PR makes the existing quality tools actually work and adds
CI to enforce them on every push/PR.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant