Skip to content

Add support in documentation for type aliases using Python 3.12 type definition #4044

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

Merged
merged 3 commits into from
Dec 6, 2024

Conversation

chopan050
Copy link
Contributor

Closes #3772

I tested it by adding new type aliases and rewriting old ones with the new type syntax and it worked fine, in the same way as it does with our TypeAlias-annotated assignments. However, I must note that, when attempting to define type ManimFloat = np.float64, Manim crashes with a TypeError: Cannot interpret 'ManimFloat' as a data type.

Reviewer Checklist

  • The PR title is descriptive enough for the changelog, and the PR is labeled correctly
  • If applicable: newly added non-private functions and classes have a docstring including a short summary and a PARAMETERS section
  • If applicable: newly added functions and classes are tested

@chopan050 chopan050 changed the title Add support in documentation for type aliases defined with Python 3.12 type syntax Add support in documentation for type aliases using Python 3.12 type definition Dec 6, 2024
Copy link
Member

@JasonGrace2282 JasonGrace2282 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@chopan050 chopan050 merged commit d485986 into ManimCommunity:main Dec 6, 2024
21 checks passed
@chopan050 chopan050 deleted the type-alias-3-12-syntax branch December 6, 2024 23:07
JasonGrace2282 added a commit to JasonGrace2282/manim that referenced this pull request Dec 6, 2024
behackl pushed a commit to JasonGrace2282/manim that referenced this pull request Jan 19, 2025
behackl added a commit that referenced this pull request Jan 20, 2025
* First draft of Changelog for 0.19.0

* fix typos

* added 3967

* Add #4037

* Update count 97 -> 98

* Add #4039

* Add #3930 and #4044

* Add this PR to changelog

* Add small description to changelog

* Add #3924, #3951, and #4038

* Bump Manim version to 0.19.0

* Update CITATION.cff to be more consistent

* remove github-security[bot]

* Feedback + missing PRs

* add newly merged PRs

* added more details to highlights + breaking changes

* bump date

* sort PRs in breaking changes section and include 3964

* sort highlights section

* fix: add required configuration key in .readthedocs.yml

* Update docs/source/changelog/0.19.0-changelog.rst

---------

Co-authored-by: Benjamin Hackl <[email protected]>
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.

Support Python 3.12 TypeAlias syntax
2 participants