Skip to content

Conversation

cclauss
Copy link
Contributor

@cclauss cclauss commented Apr 28, 2024

Fixes #3719 (comment)

manim/typing.py

- from typing import Callable, Union
+ from typing import Callable, Tuple, Union

@cclauss cclauss changed the title Add Tuple to manim/typing.py Add Tuple to manim/typing.py Apr 28, 2024

from os import PathLike
from typing import Callable, Union
from typing import Callable, Tuple, Union

Check notice

Code scanning / CodeQL

Unused import

Import of 'Tuple' is not used.
@JasonGrace2282
Copy link
Member

Could you elaborate on what benefit this brings? The Tuple typehint is not used anywhere in that file to my knowledge.

@cclauss
Copy link
Contributor Author

cclauss commented Apr 28, 2024

Please read #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.

@cclauss
Copy link
Contributor Author

cclauss commented Apr 28, 2024

@cclauss cclauss closed this Apr 28, 2024
@cclauss cclauss deleted the patch-1 branch April 28, 2024 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Rejected
Development

Successfully merging this pull request may close these issues.

2 participants