|
11 | 11 | from mpyflow.shared.interfaces.logger import SyncStdoutInterface |
12 | 12 | from mpyflow.shared.interfaces.work import WorkInterface |
13 | 13 | from multiprocessing import synchronize |
14 | | -from typing import Any, final, AsyncIterator |
| 14 | +from typing import final, AsyncIterator |
15 | 15 |
|
16 | 16 |
|
17 | 17 | @final |
@@ -90,13 +90,13 @@ def __init__( |
90 | 90 | self, |
91 | 91 | ctx: multiprocessing.context.SpawnContext, |
92 | 92 | work_instance: WorkInterface[IN, OT], |
93 | | - io_instance: IOInterface[IN, Any], |
| 93 | + io_instance: IOInterface[IN], |
94 | 94 | /, |
95 | 95 | ) -> None: |
96 | 96 | super().__init__() |
97 | 97 | self.__sync_out: SyncStdoutInterface | None = None |
98 | 98 | self.__work_obj: WorkInterface[IN, OT] = work_instance |
99 | | - self.__io_obj: IOInterface[IN, OT] = io_instance |
| 99 | + self.__io_obj: IOInterface[IN] = io_instance |
100 | 100 | self.__io_progress: IOProgress = IOProgress(ctx) |
101 | 101 | self.__thp: ThreadPoolExecutor | None = None |
102 | 102 | self.__gl_lock = ctx.Condition() |
@@ -170,7 +170,7 @@ async def workable_read(self) -> InputData[IN] | None: |
170 | 170 | async with self.__as_lock.reader_async: |
171 | 171 | return await self.__io_obj.read(self.thp) |
172 | 172 |
|
173 | | - async def workable_write(self, data: OT, /) -> bool: |
| 173 | + async def workable_write(self, data: IN, /) -> bool: |
174 | 174 | if self.__io_progress.end_type.error == 1 or self.sync_out.error_occurred(): |
175 | 175 | raise WorkableEx("Workable error was set!") |
176 | 176 | if not self.__io_obj.has_output(): |
|
0 commit comments