Skip to content

🏷️ Fix type annotations on public API#562

Merged
MiWeiss merged 3 commits into
mainfrom
538-type-annotations
Jun 12, 2026
Merged

🏷️ Fix type annotations on public API#562
MiWeiss merged 3 commits into
mainfrom
538-type-annotations

Conversation

@MiWeiss

@MiWeiss MiWeiss commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

The package ships py.typed, so these incorrect annotations are user-facing:

  • names.py: name_fields: Tuple[str] (a 1-tuple type) → Tuple[str, ...] in both middleware constructors and the name_fields property.
  • latex_encoding.py: keep_math, enclose_urls, keep_braced_groups, keep_math_mode declared bool = NoneOptional[bool] = None.
  • entrypoint.py: parse_string now annotated -> Library; lowercase tuple[...] aligned to the typing.Tuple style used everywhere else.

No runtime behavior change. Adding mypy/pyright to CI (which would have caught #529) is left as a possible follow-up.

Fixes #538

🤖 Generated with Claude Code

MiWeiss and others added 2 commits June 12, 2026 13:13
@MiWeiss MiWeiss merged commit 99485fd into main Jun 12, 2026
31 checks passed
@MiWeiss MiWeiss deleted the 538-type-annotations branch June 12, 2026 12:18
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.

Type annotation fixes (package ships py.typed)

1 participant