core.common: move stats-related stuff to my.core.stats and add more thorough tests/docs

deprecate core.common.stat and core.common.Stats with backwards compatibility
This commit is contained in:
Dima Gerasimov 2024-08-15 17:51:46 +03:00 committed by karlicoss
parent 18529257e7
commit c45c51af22
14 changed files with 343 additions and 246 deletions

View file

@ -9,7 +9,8 @@ from datetime import date, datetime, timedelta
from functools import lru_cache
from typing import Union
from ..core.time import zone_to_countrycode
from my.core import Stats
from my.core.time import zone_to_countrycode
@lru_cache(1)
@ -46,7 +47,6 @@ def is_workday(d: DateIsh) -> bool:
return not is_holiday(d)
from ..core.common import Stats
def stats() -> Stats:
# meh, but not sure what would be a better test?
res = {}