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

Use PEP 585 syntax for types #23

Closed
wants to merge 3 commits into from
Closed

Conversation

cclauss
Copy link

@cclauss cclauss commented Apr 28, 2024

https://peps.python.org/pep-0585/#implementation

Fixes ManimCommunity/manim#3719 (comment)

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-0585/#implementation

Fixes ManimCommunity/manim#3719 (comment)
```
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.
@drageelr
Copy link
Owner

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.

@cclauss cclauss changed the base branch from main to dev April 29, 2024 21:34
@cclauss
Copy link
Author

cclauss commented Apr 29, 2024

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.

@cclauss cclauss closed this Aug 15, 2024
@cclauss cclauss deleted the patch-1 branch August 15, 2024 16:19
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