core: more type annotations

This commit is contained in:
Dima Gerasimov 2020-10-03 13:15:15 +01:00
parent 44b756cc6b
commit 8acc3ae27b
7 changed files with 43 additions and 34 deletions

View file

@ -362,8 +362,9 @@ QUICK_STATS = False
C = TypeVar('C')
Stats = Dict[str, Any]
# todo not sure about return type...
def stat(func: Callable[[], Iterable[C]]) -> Dict[str, Any]:
def stat(func: Callable[[], Iterable[C]]) -> Stats:
from more_itertools import ilen, take, first
# todo not sure if there is something in more_itertools to compute this?