Skip to content

Commit

Permalink
ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
nedtwigg committed Dec 16, 2024
1 parent ffc90ed commit b486e73
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion python/selfie-lib/selfie_lib/CacheSelfie.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,23 @@ def cache_selfie(
else:
raise TypeError("Invalid arguments provided to cache_selfie")


def cache_selfie_json(to_cache: Callable[..., T]) -> "CacheSelfie[T]":
return cache_selfie(to_cache, Roundtrip.json())


@overload
def cache_selfie_binary(to_cache: Callable[..., bytes]) -> "CacheSelfieBinary[bytes]": ...
def cache_selfie_binary(
to_cache: Callable[..., bytes],
) -> "CacheSelfieBinary[bytes]": ...


@overload
def cache_selfie_binary(
to_cache: Callable[..., T], roundtrip: Roundtrip[T, bytes]
) -> "CacheSelfieBinary[T]": ...


def cache_selfie_binary(
to_cache: Union[Callable[..., bytes], Callable[..., T]],
roundtrip: Optional[Roundtrip[T, bytes]] = None,
Expand All @@ -57,6 +63,7 @@ def cache_selfie_binary(
else:
raise TypeError("Invalid arguments provided to cache_selfie")


class CacheSelfie(Generic[T]):
def __init__(
self,
Expand Down

0 comments on commit b486e73

Please sign in to comment.