Skip to content

Commit 616ba32

Browse files
committed
minor bug fix
1 parent 11bb883 commit 616ba32

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

autointent/context/vector_index_client/vector_index_client.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import stat
55
from collections.abc import Callable
66
from pathlib import Path
7+
from typing import Any
78

89
from autointent.custom_types import LabelType
910

@@ -109,7 +110,7 @@ def exists(self, model_name: str) -> bool:
109110
return self._get_index_dirpath(model_name) is not None
110111

111112
def delete_db(self) -> None:
112-
shutil.rmtree(self.db_dir, onerror=redo_with_write) # type: ignore[call-arg]
113+
shutil.rmtree(self.db_dir, onerror=redo_with_write) # type: ignore[arg-type]
113114

114115

115116
class NonExistingIndexError(Exception):
@@ -118,6 +119,6 @@ def __init__(self, message: str = "non-existent index was requested") -> None:
118119
super().__init__(message)
119120

120121

121-
def redo_with_write(redo_func: Callable, path: Path, err: Exception) -> None: # noqa: ARG001 # type: ignore[type-arg]
122-
Path.chmod(path, stat.S_IWRITE)
122+
def redo_with_write(redo_func: Callable[..., Any], path: str, err: Exception) -> None: # noqa: ARG001
123+
Path.chmod(Path(path), stat.S_IWRITE)
123124
redo_func(path)

0 commit comments

Comments
 (0)