Skip to content

Commit

Permalink
update type hint a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathangreen committed May 14, 2024
1 parent 1a02e63 commit 7a8d100
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/palace/manager/search/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,10 +340,12 @@ def write_pointer_set(self, revision: SearchSchemaRevision) -> None:

def read_pointer(self) -> str | None:
try:
result = self._client.indices.get_alias(name=self.read_pointer_name())
result: dict[str, Any] = self._client.indices.get_alias(
name=self.read_pointer_name()
)
for name in result.keys():
if name.startswith(f"{self.base_revision_name}-"):
return name # type: ignore[no-any-return]
return name
return None
except NotFoundError:
return None
Expand Down

0 comments on commit 7a8d100

Please sign in to comment.