Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ jobs:
python-version: "3.12"
- run: uv lock
- run: uv sync --all-packages
# Not bare `mypy .`: the per-package `tests/conftest.py` files collide under mypy's module
# resolution, which aborts the run before anything is checked. `make typecheck` runs this
# same command.
- run: uv run mypy packages/*/src

# ─── Test ───────────────────────────────────────────────────────────────────
Expand Down
5 changes: 5 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ The mypy config uses `strict = true`, which enforces:

When adding new functions or methods, always include full type annotations. Run `make typecheck` to verify before pushing.

`make typecheck` checks `packages/*/src` — the same invocation CI runs. Do not change it to bare
`mypy .`: the per-package `tests/conftest.py` files all resolve to the module name `conftest`, and
mypy aborts on that clash before checking anything. Test suites are not type-checked today; making
them mypy-clean under `strict` is a separate piece of work.

#### `Generic[T]` syntax is intentionally kept (UP046 is ignored)

The `UP046` rule (PEP 695 `type` statement syntax for generic classes) is **ignored** in `pyproject.toml`. Do not convert `class Foo(Generic[T]):` to PEP 695 syntax — it is a deliberate migration decision.
Expand Down
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,13 @@ test:
uv run pytest

# Type-check all packages (uv run mypy)
# Not bare `mypy .`: the per-package `tests/conftest.py` files all resolve to the module name
# `conftest`, and mypy aborts on that clash (`Duplicate module named "conftest"`) before checking
# anything, so the command gives no signal at all. CI type-checks package sources only — both
# `.github/workflows/ci.yml` and `.github/actions/ci/action.yml` — and this mirrors that exactly so
# local and CI agree. The test suites are not currently mypy-clean under `strict`.
typecheck:
uv run mypy .
uv run mypy packages/*/src

# Check for lint errors
lint:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ A `Makefile` is provided as a consistent interface alongside the `uv` commands.
|---|---|---|
| `make start` | `uv run python main.py` | Run `main.py` |
| `make test` | `uv run pytest` | Run all tests |
| `make typecheck` | `uv run mypy .` | Type-check all packages |
| `make typecheck` | `uv run mypy packages/*/src` | Type-check all package sources (the same invocation CI runs) |

### Running the examples

Expand Down
Loading