Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-49036: Switch to new syntax for generics #385

Merged
merged 1 commit into from
Feb 19, 2025
Merged

DM-49036: Switch to new syntax for generics #385

merged 1 commit into from
Feb 19, 2025

Conversation

rra
Copy link
Member

@rra rra commented Feb 19, 2025

Use the new syntax added in Python 3.12 for generics. This results in better typing in mypy, which required a few added casts because the typing of metrics publishers is dynamic and somewhat strange.

Sphinx unfortunately has bugs generating documentation for generics when from __future__ import annotations is present, so remove that line from several modules so that the documentation will generate properly.

autodoc_pydantic is unfortunately very buggy when used with Annotated, which required several additional ignore rules and probably results in poor documentation for some Pydantic models.

Use the new syntax added in Python 3.12 for generics. This results
in better typing in mypy, which required a few added casts because
the typing of metrics publishers is dynamic and somewhat strange.

Sphinx unfortunately has bugs generating documentation for generics
when `from __future__ import annotations` is present, so remove that
line from several modules so that the documentation will generate
properly.

autodoc_pydantic is unfortunately very buggy when used with
`Annotated`, which required several additional ignore rules and
probably results in poor documentation for some Pydantic models.
@rra rra merged commit e7cb78d into main Feb 19, 2025
6 checks passed
@rra rra deleted the tickets/DM-49036 branch February 19, 2025 20:40
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