Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added memoize/py.typed
Empty file.
17 changes: 17 additions & 0 deletions memoize/wrapper.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
from typing import Callable, TypeVar, overload, Optional

from memoize.configuration import CacheConfiguration
from memoize.invalidation import InvalidationSupport
from memoize.statuses import UpdateStatuses

FN = TypeVar('FN', bound=Callable)


@overload
def memoize(*, configuration: Optional[CacheConfiguration] = None,
invalidation: Optional[InvalidationSupport] = None, update_statuses: Optional[UpdateStatuses] = None) -> Callable[[FN], FN]: ...


@overload
def memoize(method: FN, configuration: Optional[CacheConfiguration] = None,
invalidation: Optional[InvalidationSupport] = None, update_statuses: Optional[UpdateStatuses] = None) -> FN: ...
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ def prepare_description():
url='https://github.com/DreamLab/memoize',
maintainer='DreamLab',
packages=['memoize'],
package_data={'memoize': ['py.typed']},
test_suite='tests',
license='Apache License 2.0',
description=('Caching library for asynchronous Python applications (both based on asyncio and Tornado) '
Expand Down