Refactor chromadb import in run.py for type hinting

This commit modifies run.py to use type hinting and avoid circular imports by changing the import for NotEnoughElementsException to use type: ignore. Specifically, the code now imports from chromadb.errors instead of chromadb.exceptions.
This commit is contained in:
Gabriel Almeida 2023-04-25 12:08:32 -03:00 committed by Gabriel Luiz Freitas Almeida
commit 0f0366ebbb

View file

@ -1,7 +1,7 @@
import contextlib
import io
from typing import Any, Dict
from chromadb.errors import NotEnoughElementsException
from chromadb.errors import NotEnoughElementsException # type: ignore
from langflow.cache.utils import compute_dict_hash, load_cache, memoize_dict
from langflow.graph.graph import Graph