Skip to content

add get_entry and get_entry_without_label to table#4697

Open
nitzan-treg wants to merge 1 commit intoManimCommunity:mainfrom
nitzan-treg:fix/2051-tablegetentries-should-be-split-in-two
Open

add get_entry and get_entry_without_label to table#4697
nitzan-treg wants to merge 1 commit intoManimCommunity:mainfrom
nitzan-treg:fix/2051-tablegetentries-should-be-split-in-two

Conversation

@nitzan-treg
Copy link
Copy Markdown

Overview: What does this pull request change?

hey, trying to fix #2051

added two new methods to the Table class -- get_entry(pos) and get_entry_without_label(pos) -- that return a single VMobject at the given position. they just delegate to the existing get_entries and get_entries_without_labels methods so nothing breaks, but now you have dedicated single-entry methods with proper explicit return types instead of the weird union return on the plural methods. the original methods are untouched for backward compat.

Motivation and Explanation: Why and how do your changes improve the library?

Links to added or changed documentation pages

Further Information and Comments

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

added two new methods to the table class -- `get_entry(pos)` and `get_entry_without_label(pos)` -- that return a single vmobject at the given position. they just delegate to the existing `get_entries` and `get_entries_without_labels` methods so nothing breaks, but now you have dedicated single-entry methods with proper explicit return types instead of the weird union return on the plural methods. the original methods are untouched for backward compat.

Signed-off-by: nitzan-treg <nitzan.tregerman@gmail.com>
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.

Table.get_entries() should be split in two

1 participant