manim-data-structures
manim-data-structures copied to clipboard
Use PEP 585 syntax for types
https://peps.python.org/pep-0585/#implementation
Fixes https://github.com/ManimCommunity/manim/pull/3719#issuecomment-2081482865
File "/Users/michol/opt/anaconda3/lib/python3.9/site-packages/manim_data_structures/m_array.py", line 630, in MArray
def __calc_label_pos_and_mob(self) -> typing.Tuple[Square, np.ndarray]:
AttributeError: module 'manim.typing' has no attribute 'Tuple'
A rapid migration to https://peps.python.org/pep-0585/#implementation might improve reliability.
The wildcard import from manim import *
on line 7 is a bad idea as discussed in PEP 8.
- https://peps.python.org/pep-0008/#imports
- https://docs.astral.sh/ruff/rules/undefined-local-with-import-star-usage/
- https://github.com/asmeurer/removestar
I'd appreciate if you'd cater to all instances of tuple.*
in both m_variable.py
and m_array.py
file. Secondly, please generate the PR for the dev
branch.
I'd appreciate if you'd cater to all instances of tuple.* in both m_variable.py and m_array.py file.
This is already done because neither Tuple
nor List
appear in m_variable.py
.
Secondly, please generate the PR for the dev branch.
Done.
- #25