core.common: move Json, datetime_aware, datetime_naive, is_namedtuple, asdict to my.core.types

This commit is contained in:
Dima Gerasimov 2024-08-16 11:46:29 +03:00
parent 432c64ef56
commit e0d1dbd533
15 changed files with 78 additions and 56 deletions

View file

@ -24,6 +24,8 @@ from typing import (
cast,
)
from .types import asdict
Stats = Dict[str, Any]
@ -432,8 +434,6 @@ def test_stat_iterable() -> None:
# experimental, not sure about it..
def _guess_datetime(x: Any) -> Optional[datetime]:
from .common import asdict # avoid circular imports
# todo hmm implement without exception..
try:
d = asdict(x)