Skip to content

Commit

Permalink
Fix type annotation for async client
Browse files Browse the repository at this point in the history
  • Loading branch information
Galtozzy committed Jul 19, 2024
1 parent 5c01c48 commit dbb8178
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions py_cachify/backend/types.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
from __future__ import annotations

from typing import Any, Protocol, Union
from typing import Any, Awaitable, Protocol, Union


class AsyncClient(Protocol):
async def get(self, name: str) -> Any | None:
def get(self, name: str) -> Awaitable[Any]:
raise NotImplementedError

async def delete(self, *names: str) -> Any:
def delete(self, *names: str) -> Awaitable[Any]:
raise NotImplementedError

async def set(self, name: str, value: Any, ex: Union[int, None] = None) -> Any:
def set(self, name: str, value: Any, ex: Union[int, None] = None) -> Awaitable[Any]:
raise NotImplementedError


Expand Down

0 comments on commit dbb8178

Please sign in to comment.