Skip to content

Add type annotations to table.py - #4641

Merged
behackl merged 11 commits into
ManimCommunity:mainfrom
henrikmidtiby:typingTable
Aug 6, 2026
Merged

Add type annotations to table.py#4641
behackl merged 11 commits into
ManimCommunity:mainfrom
henrikmidtiby:typingTable

Conversation

@henrikmidtiby

Copy link
Copy Markdown
Contributor

Overview: What does this pull request change?

This PR adds type annotations to table.py.

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

@henrikmidtiby henrikmidtiby added the typehints For adding/discussing typehints label Mar 16, 2026

@behackl behackl left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I pushed a reviewer commit reverting these parameters to Iterable. Sequence excludes NumPy arrays at type-checking time, even though arrays are documented and supported table inputs.

The constructor now materializes the outer and inner iterables immediately, so Iterable accurately reflects what the implementation requires while also safely supporting generators. I added regression coverage for iterable data, NumPy label arrays, and empty label iterables.

Happy to merge this now; thanks!

@behackl
behackl merged commit bd1276a into ManimCommunity:main Aug 6, 2026
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

typehints For adding/discussing typehints

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants