core: update cachew annotations

orgmode: expose method to construct cacheable note
This commit is contained in:
Dima Gerasimov 2020-10-14 22:05:42 +01:00 committed by karlicoss
parent bdfac96352
commit 2a2478bfa9
3 changed files with 33 additions and 12 deletions

View file

@ -197,7 +197,16 @@ if TYPE_CHECKING:
# ok, that's actually a super nice 'pattern'
F = TypeVar('F')
class McachewType(Protocol):
def __call__(self, cache_path: Any=None, *, hashf: Any=None, chunk_by: int=0, logger: Any=None) -> Callable[[F], F]:
def __call__(
self,
cache_path: Any=None,
*,
hashf: Any=None, # todo deprecate
depends_on: Any=None,
force_file: bool=False,
chunk_by: int=0,
logger: Any=None,
) -> Callable[[F], F]:
...
mcachew: McachewType