Skip to content

Commit

Permalink
fixed lint
Browse files Browse the repository at this point in the history
  • Loading branch information
lkuligin committed Feb 26, 2024
1 parent 74bad9d commit ebef712
Showing 1 changed file with 6 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import uuid
import warnings
from typing import TYPE_CHECKING, Any, Iterable, List, Optional, Tuple, Type, Union
from typing import Any, Iterable, List, Optional, Tuple, Type, Union

from google.cloud.aiplatform.matching_engine.matching_engine_index_endpoint import (
Namespace,
Expand All @@ -19,9 +19,6 @@
Searcher,
)

if TYPE_CHECKING:
from langchain_community.embeddings import TensorflowHubEmbeddings


class _BaseVertexAIVectorStore(VectorStore):
"""Represents a base vector store based on VertexAI."""
Expand Down Expand Up @@ -189,7 +186,7 @@ def from_texts(
)

@classmethod
def _get_default_embeddings(cls) -> "TensorflowHubEmbeddings":
def _get_default_embeddings(cls) -> Embeddings:
"""This function returns the default embedding.
Returns:
Default TensorflowHubEmbeddings to use.
Expand All @@ -205,12 +202,10 @@ def _get_default_embeddings(cls) -> "TensorflowHubEmbeddings":
)

# TODO: Change to vertexai embbedingss

from langchain_community.embeddings import (
TensorflowHubEmbeddings, # type: ignore
)

return TensorflowHubEmbeddings()
# type: ignore[import-not-found]
from langchain_community import embeddings
g
return embeddings.TensorflowHubEmbeddings()

Check failure on line 208 in libs/vertexai/langchain_google_vertexai/vectorstores/vectorstores.py

View workflow job for this annotation

GitHub Actions / cd libs/vertexai / - / make lint #3.8

Ruff (E999)

langchain_google_vertexai/vectorstores/vectorstores.py:208:1: E999 SyntaxError: Unexpected token Indent

Check failure on line 208 in libs/vertexai/langchain_google_vertexai/vectorstores/vectorstores.py

View workflow job for this annotation

GitHub Actions / cd libs/vertexai / - / make lint #3.11

Ruff (E999)

langchain_google_vertexai/vectorstores/vectorstores.py:208:1: E999 SyntaxError: Unexpected token Indent

def _generate_unique_ids(self, number: int) -> List[str]:
"""Generates a list of unique ids of length `number`
Expand Down

0 comments on commit ebef712

Please sign in to comment.