Skip to content

Commit

Permalink
Fix llama_index mypy errors
Browse files Browse the repository at this point in the history
  • Loading branch information
stefannica committed Nov 23, 2023
1 parent 1d7c33f commit d0af0c4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,12 @@
Document = Any
LCDocument = Any
else:
from langchain.docstore.document import Document as LCDocument
from llama_index.readers.schema.base import Document
from langchain.docstore.document import ( # type: ignore[import]
Document as LCDocument,
)
from llama_index.readers.schema.base import ( # type: ignore[import]
Document,
)


class LlamaIndexDocumentMaterializer(LangchainDocumentMaterializer):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,12 @@
GPTFaissIndex = Any
T = TypeVar("T", bound=Any)
else:
from llama_index.indices.base import BaseGPTIndex
from llama_index.indices.vector_store import GPTFaissIndex
from llama_index.indices.base import ( # type: ignore[import]
BaseGPTIndex,
)
from llama_index.indices.vector_store import ( # type: ignore[import]
GPTFaissIndex,
)

T = TypeVar("T", bound=BaseGPTIndex[Any])

Expand Down

0 comments on commit d0af0c4

Please sign in to comment.