From 871c832dc7e63057d28299e8c8356199237478ac Mon Sep 17 00:00:00 2001 From: Dmitry Shemetov Date: Mon, 15 Jul 2024 12:44:04 -0700 Subject: [PATCH] refactor: put all types in _model --- epidatpy/_covidcast.py | 5 ++--- epidatpy/_model.py | 3 +++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/epidatpy/_covidcast.py b/epidatpy/_covidcast.py index 579de04..43e2b99 100644 --- a/epidatpy/_covidcast.py +++ b/epidatpy/_covidcast.py @@ -25,12 +25,11 @@ EpidataFieldInfo, EpidataFieldType, EpiRangeParam, + GeoType, InvalidArgumentException, + TimeType, ) -GeoType = Literal["nation", "msa", "hrr", "hhs", "state", "county"] -TimeType = Literal["day", "week"] - @dataclass class WebLink: diff --git a/epidatpy/_model.py b/epidatpy/_model.py index 4a7b910..6e401a7 100644 --- a/epidatpy/_model.py +++ b/epidatpy/_model.py @@ -4,6 +4,7 @@ from typing import ( Final, List, + Literal, Mapping, Optional, Sequence, @@ -24,6 +25,8 @@ parse_user_date_or_week, ) +GeoType = Literal["nation", "msa", "hrr", "hhs", "state", "county"] +TimeType = Literal["day", "week"] EpiDateLike = Union[int, str, date, Week] EpiRangeDict = TypedDict("EpiRangeDict", {"from": EpiDateLike, "to": EpiDateLike}) EpiRangeLike = Union[int, str, "EpiRange", EpiRangeDict, date, Week]