Skip to content

Enforce Google Python Style Guide#6

Merged
folded merged 1 commit intomainfrom
enforce-pystyle
Mar 14, 2026
Merged

Enforce Google Python Style Guide#6
folded merged 1 commit intomainfrom
enforce-pystyle

Conversation

@folded
Copy link
Collaborator

@folded folded commented Mar 13, 2026

Summary

  • Renames types.pyanchors.py to avoid shadowing the stdlib types module; establishes anchors.Anchor / anchors.BBox as the unambiguous internal reference path
  • Replaces all direct class/function imports with module-qualified references throughout internal modules (anchors.Anchor, providers.MarkdownProvider, bbox_alignment.align_anchors, etc.)
  • Adds module docstrings to all source files
  • Replaces assert with explicit RuntimeError in range_ops sweep-line invariant check
  • Expands chunks() docstring with Args/Yields/Raises; adds Args to align()
  • Uses abstract types in public signatures (Sequence/Mapping over list/dict)
  • Updates test_regression.py to use the public API (anchorite.Anchor, anchorite.document) rather than internal submodule paths

Test plan

  • All 56 tests pass
  • Pre-commit (ruff, mypy) passes

🤖 Generated with Claude Code

@folded folded requested a review from lgruen-vcgs March 13, 2026 23:50
- Rename types.py -> anchors.py to avoid shadowing stdlib `types` module
- Replace all direct class/function imports with module-qualified references
  throughout internal modules (anchors.Anchor, providers.MarkdownProvider,
  bbox_alignment.align_anchors, etc.)
- Add module docstrings to all source files
- Replace assert with explicit RuntimeError in range_ops sweep-line invariant
- Expand chunks() docstring with Args/Yields/Raises sections
- Add Args section to align() docstring
- Use abstract types in public signatures: Sequence/Mapping over list/dict
- Update test_regression.py to use public API (anchorite.Anchor, anchorite.document)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@folded folded force-pushed the enforce-pystyle branch 2 times, most recently from 7bf21ee to 45001fd Compare March 14, 2026 06:20
@folded folded merged commit e88bfaa into main Mar 14, 2026
3 checks passed
@folded folded deleted the enforce-pystyle branch March 14, 2026 06:24
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.

2 participants