Skip to content

Commit 35d1a16

Browse files
committed
fix for mypy
1 parent 7b365fd commit 35d1a16

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

executor/engine/job/utils.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ def __init__(self, job: "Job", valid_status: T.List[JobStatusType]):
3838
f"but should be in {valid_status} state.")
3939

4040

41-
_T = T.TypeVar("_T")
4241
_thread_locals = threading.local()
4342

4443

@@ -66,7 +65,7 @@ def _gen_anext(fut=None): # pragma: no cover
6665
return asyncio.run(fut.__anext__())
6766

6867

69-
class GeneratorWrapper(T.Generic[_T]):
68+
class GeneratorWrapper():
7069
"""
7170
wrap a generator in executor pool
7271
"""
@@ -79,7 +78,7 @@ def __init__(self, job: "Job", fut: T.Optional[Future] = None):
7978
def __iter__(self):
8079
return self
8180

82-
def __next__(self) -> _T:
81+
def __next__(self):
8382
try:
8483
if self._job._executor is not None:
8584
return self._job._executor.submit(
@@ -106,7 +105,7 @@ def __next__(self) -> _T:
106105
def __aiter__(self):
107106
return self
108107

109-
async def __anext__(self) -> _T:
108+
async def __anext__(self):
110109
try:
111110
if self._job._executor is not None:
112111
fut = self._job._executor.submit(_gen_anext, self._fut)

0 commit comments

Comments
 (0)