Skip to content

Fix transformable label todo #4377

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mo1ein
Copy link

@mo1ein mo1ein commented Aug 5, 2025

Overview: What does this pull request change?

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

This PR improves type safety and code quality by:

  • Creating a proper TransformableLabel class to handle transformable labels with clear type annotations
  • Removing type ignore comments by adding proper type hints
  • Improving the constructor to handle both MathTex and string transformation names
  • Cleaning up kwargs management by separating MathTex constructor arguments
  • Updating type annotations for the transformable_labels list
  • Fixing the get_transformable_label_movement method to use the new attribute names

These changes resolve the TODO comment about unclear types in the add_transformable_label function and make the code more maintainable and type-safe.

Links to added or changed documentation pages

Further Information and Comments

The changes maintain backward compatibility while improving type safety and code clarity.

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

mo1ein added 2 commits August 6, 2025 01:22
- Create TransformableLabel class to properly type transformable labels
- Remove type ignore comments by adding proper type annotations
- Improve constructor to handle MathTex and string transformation names
- Clean kwargs management by separating MathTex constructor args
- Update transformable_labels list type annotation
- Fix get_transformable_label_movement method to use new attribute names

Resolves TODO comment about unclear types in add_transformable_label function.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🆕 New
Development

Successfully merging this pull request may close these issues.

1 participant