File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 2
2
3
3
import json
4
4
from functools import wraps
5
- from typing import TYPE_CHECKING , Any , Callable
5
+ from typing import TYPE_CHECKING , Any , Callable , TypeVar
6
6
7
7
from requests import Response
8
8
11
11
from meilisearch .index import Index
12
12
from meilisearch .task import TaskHandler
13
13
14
+ T = TypeVar ("T" )
15
+
14
16
15
17
class MeilisearchError (Exception ): # pragma: no cover
16
18
"""Generic class for Meilisearch error handling"""
@@ -63,7 +65,7 @@ def __str__(self) -> str: # pragma: no cover
63
65
return f"MeilisearchTimeoutError, { self .message } "
64
66
65
67
66
- def version_error_hint_message (func : Callable ) -> Any :
68
+ def version_error_hint_message (func : Callable [..., T ] ) -> Callable [..., T ] :
67
69
@wraps (func )
68
70
def wrapper (* args : Any , ** kwargs : Any ) -> Any :
69
71
try :
You can’t perform that action at this time.
0 commit comments