Skip to content

Type-check the README's Python examples - #18

Merged
tmoosting merged 1 commit into
mainfrom
readme-checks
Nov 19, 2026
Merged

tmoosting merged 1 commit into
mainfrom
readme-checks

Conversation

@tmoosting

Copy link
Copy Markdown
Member

Every python block in README.md is checked with mypy --strict against the installed package in tests/test_readme.py, each block its own module. One example that did not type-check under strict is fixed.

Watched failing: a renamed method, a keyword the function lacks, a misspelt export and an unknown name each turn the test red naming the README line. Not held: element bodies are dict[str, Any], so a wrong key or value inside one passes; nothing is run.

🤖 Generated with Claude Code

Each python block of README.md is checked on its own with mypy --strict
against the installed package (the wheel in CI's wheel job): names a block
takes from an earlier one are declared from a typed table, names the
package exports are imported from it, and an unknown name fails by name.
The folder example now checks that the folder's world is present before
reading it, as mypy --strict asks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tmoosting
tmoosting merged commit 09c764b into main Nov 19, 2026
11 checks passed
@tmoosting
tmoosting deleted the readme-checks branch November 19, 2026 02:34
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