Skip to content

Commit

Permalink
request handler validation fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nekufa committed Sep 23, 2023
1 parent c45284d commit 74c6384
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sharded_queue/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ async def create(cls) -> Self:

@classmethod
def request_cls(cls) -> type[T]:
cls = list(get_type_hints(cls.handle).values())[0]
if cls is T:
request_cls = list(get_type_hints(cls.handle).values())[0]
if isinstance(request_cls, TypeVar):
raise NotImplementedError
return cls
return request_cls

@classmethod
async def route(cls, *requests: T) -> list[Route]:
Expand Down

0 comments on commit 74c6384

Please sign in to comment.