core: improve mypy coverage

This commit is contained in:
Dima Gerasimov 2021-02-17 23:10:37 +00:00 committed by karlicoss
parent 56d5587c20
commit 4ad4f34cda
6 changed files with 60 additions and 43 deletions

View file

@ -377,6 +377,7 @@ QUICK_STATS = False
C = TypeVar('C')
Stats = Dict[str, Any]
StatsFun = Callable[[], Stats]
# todo not sure about return type...
def stat(func: Union[Callable[[], Iterable[C]], Iterable[C]]) -> Stats:
if callable(func):