Skip to content

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