Skip to content
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

improve typing to 3.9 standards #409

Merged
merged 1 commit into from
Oct 8, 2024
Merged

improve typing to 3.9 standards #409

merged 1 commit into from
Oct 8, 2024

Conversation

michaelfeil
Copy link
Owner

This pull request focuses on updating type annotations to use the new built-in generic types introduced in Python 3.9, such as list and set, instead of the older List and Set from the typing module. The most important changes include updates to type annotations in various functions and methods across multiple files.

Type Annotation Updates:

  • libs/infinity_emb/infinity_emb/engine.py

    • Updated type annotations for capabilities property and various methods to use set and list instead of Set and List. [1] [2] [3] [4]
  • libs/infinity_emb/infinity_emb/fastapi_schemas/data_uri.py

    • Updated type annotations in methods to use dict and tuple instead of Dict and Tuple. [1] [2] [3]
  • libs/infinity_emb/infinity_emb/inference/batch_handler.py

    • Updated type annotations for capabilities property and various methods to use set and list instead of Set and List. [1] [2] [3] [4] [5]
  • libs/infinity_emb/infinity_emb/infinity_server.py

    • Updated type annotations in methods to use list instead of List. [1] [2]
  • libs/infinity_emb/infinity_emb/sync_engine.py

    • Removed unused List import and updated type annotations in methods to use list instead of List. [1] [2]
  • libs/infinity_emb/infinity_emb/transformer/abstract.py

    • Updated type annotations for capabilities property to use set instead of Set. [1] [2]
  • libs/infinity_emb/infinity_emb/transformer/vision/utils.py

    • Updated type annotations in method to use list instead of List. [1] [2]

@codecov-commenter
Copy link

codecov-commenter commented Oct 8, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.73%. Comparing base (2528349) to head (1cac530).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #409   +/-   ##
=======================================
  Coverage   78.73%   78.73%           
=======================================
  Files          39       39           
  Lines        3015     3015           
=======================================
  Hits         2374     2374           
  Misses        641      641           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@michaelfeil michaelfeil merged commit 98c5895 into main Oct 8, 2024
36 checks passed
@michaelfeil michaelfeil deleted the improve-typing branch October 8, 2024 16:18
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