What
Add a minimal linting setup so that syntax errors and basic style issues are caught automatically on PRs.
Blocked by
Tasks
1. Create pyproject.toml
[project]
name = "micropython-steami-sample"
version = "0.1.0"
description = "MicroPython sample scripts for the STeaMi board."
[tool.ruff]
line-length = 99
target-version = "py310"
[tool.ruff.lint]
select = ["E", "F", "W"]
ignore = ["E501"]
Only basic rules (pycodestyle + pyflakes) — enough to catch real errors without being too strict for example code.
2. Create .github/workflows/lint.yml
name: Lint
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"
- run: pip install ruff
- run: ruff check .
3. Fix existing violations
Run ruff check . on the repo and fix any issues (auto-fixable with ruff check --fix, the rest manually).
Why
Currently there is no CI and no linting. Syntax errors or broken imports can be merged without anyone noticing. A 3-line workflow + a 10-line config file prevents that.
What
Add a minimal linting setup so that syntax errors and basic style issues are caught automatically on PRs.
Blocked by
Tasks
1. Create
pyproject.tomlOnly basic rules (pycodestyle + pyflakes) — enough to catch real errors without being too strict for example code.
2. Create
.github/workflows/lint.yml3. Fix existing violations
Run
ruff check .on the repo and fix any issues (auto-fixable withruff check --fix, the rest manually).Why
Currently there is no CI and no linting. Syntax errors or broken imports can be merged without anyone noticing. A 3-line workflow + a 10-line config file prevents that.