ci: guard docstrings against typography that breaks docs generation#142
Merged
Conversation
The public docstrings are the source for an auto-generated API reference whose build rejects em dashes. Replace them with hyphens or colons. Scope is docstrings only; comment em dashes are left unchanged.
Add an AST-based guard that flags em dashes, en dashes, smart quotes, and ellipsis in docstrings under src/ (including PEP 257 attribute docstrings), skipping the generated _proto stubs. Wire it into a new PR workflow and the mise check aggregate so future docstrings stay clean.
brandonrjacobs
approved these changes
Jul 2, 2026
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.
Why
This package's public docstrings are the source for an auto-generated API reference. The documentation build rejects certain typographic characters - em dashes, en dashes, smart quotes, and ellipsis - which otherwise pass straight through into the rendered output and fail the build.
What
scripts/check_docstring_hygiene.py) wired into a new CI workflow and intomise run check, so future changes stay clean. The guard inspects docstrings only - including PEP 257 attribute docstrings - and skips the generated_proto/stubs.Scope notes