Skip to content

Conversation

@guillaume-vignal
Copy link
Collaborator

Description:
This PR addresses deprecation warnings raised by the ruff linter regarding the use of typing.List and typing.Tuple. These are now considered outdated in favor of the built-in list and tuple type hints (PEP 585), and updating them helps ensure forward compatibility and cleaner code.

Changes made:

  • Replaced List[...] with list[...] across all affected files.
  • Replaced Tuple[...] with tuple[...] where applicable.
  • Removed unused or redundant imports of List and Tuple from the typing module.

Linting and Pre-commit:

  • Ran pre-commit hooks with success after changes.
  • No functional changes were made; this is strictly a type hint and formatting update.

Copy link
Collaborator

@guerinclement guerinclement left a comment

Choose a reason for hiding this comment

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

Optional and Union are on the line but I think we are safe until python 3.9 or even 3.10 are still maintained.

@guillaume-vignal guillaume-vignal merged commit b01678f into MAIF:master Apr 25, 2025
@guillaume-vignal guillaume-vignal deleted the fix/Tuple_List branch April 25, 2025 09:55
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.

2 participants