Repository navigation
Type-check the README's Python examples - #18
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every
pythonblock in README.md is checked withmypy --strictagainst the installed package intests/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