Skip to content

Commit

Permalink
fixed linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
avaxaleph committed Aug 1, 2024
1 parent de29d67 commit 4b25aae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ def list_assigned_filter_index_names(
self._raise_for_status(response)
return [str(filter_index_name) for filter_index_name in response.json()]

def list_filter_indexes_in_namespace(self, namespace) -> Sequence[str]:
def list_filter_indexes_in_namespace(self, namespace: str) -> Sequence[str]:
"""List all filter indexes in a namespace.
Args:
Expand Down Expand Up @@ -702,7 +702,7 @@ def search(
"""
url = f"{self._base_document_index_url}/collections/{collection_path.namespace}/{collection_path.collection}/indexes/{index_name}/search"

filters = [{"with": [{"modality": "text"}]}]
filters: list[dict[str, Any]] = [{"with": [{"modality": "text"}]}]
if search_query.filters:
for metadata_filter in search_query.filters:
filters.append(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def _get_absolute_position(
return {"start": start, "end": end}

def get_relevant_documents_with_scores(
self, query: str, filters: Optional[Filters] = None
self, query: str, filters: Optional[list[Filters]] = None
) -> Sequence[SearchResult[DocumentPath]]:
search_query = SearchQuery(
query=query, max_results=self._k, min_score=self._threshold, filters=filters
Expand Down

0 comments on commit 4b25aae

Please sign in to comment.