Skip to content

Commit 3d7cc75

Browse files
committed
Interface docstring fixes
1 parent e3edbf2 commit 3d7cc75

File tree

12 files changed

+18
-18
lines changed

12 files changed

+18
-18
lines changed

fastembed/common/model_management.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def list_supported_models(cls) -> list[ModelDescription]:
2727
"""Lists the supported models.
2828
2929
Returns:
30-
list[dict[str, Any]]: A list of dictionaries containing the model information.
30+
list[ModelDescription]: A list of dictionaries containing the model information.
3131
"""
3232
raise NotImplementedError()
3333

@@ -43,7 +43,7 @@ def _get_model_description(cls, model_name: str) -> ModelDescription:
4343
ValueError: If the model_name is not supported.
4444
4545
Returns:
46-
dict[str, Any]: The model description.
46+
ModelDescription: The model description.
4747
"""
4848
for model in cls.list_supported_models():
4949
if model_name.lower() == model.model.lower():
@@ -340,13 +340,13 @@ def retrieve_model_gcs(
340340

341341
@classmethod
342342
def download_model(
343-
cls, model: dict[str, Any], cache_dir: str, retries: int = 3, **kwargs: Any
343+
cls, model: ModelDescription, cache_dir: str, retries: int = 3, **kwargs: Any
344344
) -> Path:
345345
"""
346346
Downloads a model from HuggingFace Hub or Google Cloud Storage.
347347
348348
Args:
349-
model (dict[str, Any]): The model description.
349+
model (ModelDescription): The model description.
350350
Example:
351351
```
352352
{

fastembed/image/image_embedding.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def list_supported_models(cls) -> list[ModelDescription]:
1616
Lists the supported models.
1717
1818
Returns:
19-
list[dict[str, Any]]: A list of dictionaries containing the model information.
19+
list[ModelDescription]: A list of dictionaries containing the model information.
2020
2121
Example:
2222
```
@@ -35,7 +35,7 @@ def list_supported_models(cls) -> list[ModelDescription]:
3535
]
3636
```
3737
"""
38-
result: list[dict[str, Any]] = []
38+
result: list[ModelDescription] = []
3939
for embedding in cls.EMBEDDINGS_REGISTRY:
4040
result.extend(embedding.list_supported_models())
4141
return result

fastembed/late_interaction/late_interaction_text_embedding.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def list_supported_models(cls) -> list[ModelDescription]:
1919
Lists the supported models.
2020
2121
Returns:
22-
list[dict[str, Any]]: A list of dictionaries containing the model information.
22+
list[ModelDescription]: A list of dictionaries containing the model information.
2323
2424
Example:
2525
```

fastembed/late_interaction_multimodal/colpali.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def list_supported_models(cls) -> list[ModelDescription]:
112112
"""Lists the supported models.
113113
114114
Returns:
115-
list[dict[str, Any]]: A list of dictionaries containing the model information.
115+
list[ModelDescription]: A list of dictionaries containing the model information.
116116
"""
117117
return supported_colpali_models
118118

fastembed/late_interaction_multimodal/late_interaction_multimodal_embedding.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def list_supported_models(cls) -> list[ModelDescription]:
1919
Lists the supported models.
2020
2121
Returns:
22-
list[dict[str, Any]]: A list of dictionaries containing the model information.
22+
list[ModelDescription]: A list of dictionaries containing the model information.
2323
2424
Example:
2525
```

fastembed/rerank/cross_encoder/onnx_text_cross_encoder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def list_supported_models(cls) -> list[ModelDescription]:
7676
"""Lists the supported models.
7777
7878
Returns:
79-
list[dict[str, Any]]: A list of dictionaries containing the model information.
79+
list[ModelDescription]: A list of dictionaries containing the model information.
8080
"""
8181
return supported_onnx_models
8282

fastembed/rerank/cross_encoder/text_cross_encoder.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def list_supported_models(cls) -> list[ModelDescription]:
1616
"""Lists the supported models.
1717
1818
Returns:
19-
list[dict[str, Any]]: A list of dictionaries containing the model information.
19+
list[ModelDescription]: A list of dictionaries containing the model information.
2020
2121
Example:
2222
```
@@ -34,7 +34,7 @@ def list_supported_models(cls) -> list[ModelDescription]:
3434
]
3535
```
3636
"""
37-
result: list[dict[str, Any]] = []
37+
result: list[ModelDescription] = []
3838
for encoder in cls.CROSS_ENCODER_REGISTRY:
3939
result.extend(encoder.list_supported_models())
4040
return result

fastembed/sparse/bm25.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ def list_supported_models(cls) -> list[SparseModelDescription]:
151151
"""Lists the supported models.
152152
153153
Returns:
154-
list[dict[str, Any]]: A list of dictionaries containing the model information.
154+
list[SparseModelDescription]: A list of dictionaries containing the model information.
155155
"""
156156
return supported_bm25_models
157157

fastembed/sparse/bm42.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ def list_supported_models(cls) -> list[SparseModelDescription]:
255255
"""Lists the supported models.
256256
257257
Returns:
258-
list[dict[str, Any]]: A list of dictionaries containing the model information.
258+
list[SparseModelDescription]: A list of dictionaries containing the model information.
259259
"""
260260
return supported_bm42_models
261261

fastembed/sparse/sparse_text_embedding.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def list_supported_models(cls) -> list[SparseModelDescription]:
2121
Lists the supported models.
2222
2323
Returns:
24-
list[dict[str, Any]]: A list of dictionaries containing the model information.
24+
list[SparseModelDescription]: A list of dictionaries containing the model information.
2525
2626
Example:
2727
```
@@ -39,7 +39,7 @@ def list_supported_models(cls) -> list[SparseModelDescription]:
3939
]
4040
```
4141
"""
42-
result: list[dict[str, Any]] = []
42+
result: list[SparseModelDescription] = []
4343
for embedding in cls.EMBEDDINGS_REGISTRY:
4444
result.extend(embedding.list_supported_models())
4545
return result

0 commit comments

Comments
 (0)