Skip to content

Conversation

@BHearron
Copy link

@BHearron BHearron commented Oct 3, 2025

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

This PR fixes issue #4419.
Removes an unused type hint that mypy was flagging.

Links to added or changed documentation pages

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

…ble cell.

fix: removed type: ignore[attr-defined] mypy was not a fan of
@henrikmidtiby henrikmidtiby added the pr:bugfix Bug fix for use in PRs solving a specific issue:bug label Oct 31, 2025
Copy link
Contributor

@henrikmidtiby henrikmidtiby left a comment

Choose a reason for hiding this comment

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

Please add a test that checks whether the infinite recursion occurs as described in issue #4419.
The test file could look like this.

from __future__ import annotations

from manim.mobject.table import Table
from manim.utils.color import GREEN

def test_highlight_cell_in_table():
    # Case taken from issue 4419, which triggers an infinite loop
    table = Table(
        [["This", "is a"],["simple", "table"]]
    )
    rect = table.get_highlighted_cell((1,1), color=GREEN)
    print(rect.color)

In addition to adding the test I would also like to have a second opinion from one of the other maintainers, as the color handling code in manim is quite complex...

@github-project-automation github-project-automation bot moved this from 🆕 New to 👀 In review in Dev Board Oct 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:bugfix Bug fix for use in PRs solving a specific issue:bug

Projects

Status: 👀 In review

Development

Successfully merging this pull request may close these issues.

2 participants