Skip to content

Add type annotations to image_mobject.py#4458

Merged
chopan050 merged 3 commits intoManimCommunity:mainfrom
henrikmidtiby:typing-image-mobject
Feb 16, 2026
Merged

Add type annotations to image_mobject.py#4458
chopan050 merged 3 commits intoManimCommunity:mainfrom
henrikmidtiby:typing-image-mobject

Conversation

@henrikmidtiby
Copy link
Contributor

This PR adds type annotations to the file image_mobject.py

Further Information and Comments

When running mypy I get this error

Signature of "set_color" incompatible with supertype "manim.mobject.mobject.Mobject"  [override]

This occurs in two locations, around line 70 and line 227.
The issue is that the set_color method implemented in this file also have the named parameter alpha which is not present in the parent Mobject class.

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

@github-project-automation github-project-automation bot moved this to 🆕 New in Dev Board Oct 25, 2025
@henrikmidtiby henrikmidtiby added the typehints For adding/discussing typehints label Dec 1, 2025
@henrikmidtiby henrikmidtiby mentioned this pull request Dec 2, 2025
22 tasks
Copy link
Contributor

@chopan050 chopan050 left a comment

Choose a reason for hiding this comment

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

LGTM!

@chopan050 chopan050 enabled auto-merge (squash) February 16, 2026 15:21
@chopan050 chopan050 changed the title Added type annotations to image_mobject.py Add type annotations to image_mobject.py Feb 16, 2026
@chopan050 chopan050 merged commit 761bc46 into ManimCommunity:main Feb 16, 2026
14 of 15 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

Status: 🆕 New

Development

Successfully merging this pull request may close these issues.

2 participants