Skip to content

Commit 77cab06

Browse files
authored
Fix for mypy 1.16 (#101)
1 parent 444097d commit 77cab06

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

src/yandex_cloud_ml_sdk/_models/completions/model.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -259,8 +259,8 @@ class AsyncGPTModel(
259259
],
260260
AsyncModelBatchMixin,
261261
):
262-
_operation_type = AsyncOperation
263-
_tune_operation_type = AsyncTuningTask
262+
_operation_type = AsyncOperation[GPTModelResult[AsyncToolCall]]
263+
_tune_operation_type = AsyncTuningTask['AsyncGPTModel']
264264
_result_type = GPTModelResult[AsyncToolCall]
265265

266266
async def run(
@@ -396,8 +396,8 @@ class GPTModel(
396396
],
397397
ModelBatchMixin,
398398
):
399-
_operation_type = Operation
400-
_tune_operation_type = TuningTask
399+
_operation_type = Operation[GPTModelResult[ToolCall]]
400+
_tune_operation_type = TuningTask['GPTModel']
401401
_result_type = GPTModelResult[ToolCall]
402402
__run = run_sync(BaseGPTModel._run)
403403
__run_stream = run_sync_generator(BaseGPTModel._run_stream)

src/yandex_cloud_ml_sdk/_models/text_classifiers/model.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ async def _run_few_shot(
135135

136136

137137
class AsyncTextClassifiersModel(BaseTextClassifiersModel[AsyncTuningTask['AsyncTextClassifiersModel']]):
138-
_tune_operation_type = AsyncTuningTask
138+
_tune_operation_type = AsyncTuningTask['AsyncTextClassifiersModel']
139139

140140
async def run(
141141
self,
@@ -234,7 +234,7 @@ async def attach_tune_deferred(
234234

235235

236236
class TextClassifiersModel(BaseTextClassifiersModel[TuningTask['TextClassifiersModel']]):
237-
_tune_operation_type = TuningTask
237+
_tune_operation_type = TuningTask['TextClassifiersModel']
238238
__run = run_sync(BaseTextClassifiersModel._run)
239239
__tune_deferred = run_sync(BaseTextClassifiersModel._tune_deferred)
240240
__tune = run_sync(BaseTextClassifiersModel._tune)

src/yandex_cloud_ml_sdk/_search_indexes/domain.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ async def _list(
131131

132132
class AsyncSearchIndexes(BaseSearchIndexes[AsyncSearchIndex, AsyncOperation[AsyncSearchIndex]]):
133133
_impl = AsyncSearchIndex
134-
_operation_type = AsyncOperation
134+
_operation_type = AsyncOperation[AsyncSearchIndex]
135135

136136
async def create_deferred(
137137
self,
@@ -182,7 +182,7 @@ async def list(
182182

183183
class SearchIndexes(BaseSearchIndexes[SearchIndex, Operation[SearchIndex]]):
184184
_impl = SearchIndex
185-
_operation_type = Operation
185+
_operation_type = Operation[SearchIndex]
186186

187187
__get = run_sync(BaseSearchIndexes._get)
188188
__create_deferred = run_sync(BaseSearchIndexes._create_deferred)

0 commit comments

Comments
 (0)