File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 11import logging
2- from typing import Optional , Type
2+ from typing import Type
33
44from vectorcode .cli_utils import Config
55from vectorcode .database .base import DatabaseConnectorBase
66
77logger = logging .getLogger (name = __name__ )
88
99
10- def get_database_connector (config : Config ) -> DatabaseConnectorBase :
10+ def get_database_connector (config : Config ) -> DatabaseConnectorBase : # pragma: nocover
1111 """
1212 It's CRUCIAL to keep the `import`s of the database connectors in the branches.
1313 This allow them to be lazy-imported. This also allow us to keep the main package
1414 lightweight because we don't have to include dependencies for EVERY database.
1515
1616 > Raises a `ValueError` in case the database connector is not supported.
1717 """
18- cls : Optional [ Type [DatabaseConnectorBase ]] = None
18+ cls : Type [DatabaseConnectorBase ] | None = None
1919
2020 if not config .db_type .endswith ("Connector" ):
2121 config .db_type = f"{ config .db_type } Connector"
Original file line number Diff line number Diff line change @@ -48,7 +48,9 @@ def get_collection_id(full_path: str) -> str:
4848
4949
5050@cache
51- def get_embedding_function (configs : Config ) -> chromadb .EmbeddingFunction :
51+ def get_embedding_function (
52+ configs : Config ,
53+ ) -> chromadb .EmbeddingFunction : # pragma: nocover
5254 try :
5355 ef = getattr (embedding_functions , configs .embedding_function )(
5456 ** configs .embedding_params
You can’t perform that action at this time.
0 commit comments