Skip to content

Commit

Permalink
refactor: put all types in _model
Browse files Browse the repository at this point in the history
  • Loading branch information
dshemetov committed Jul 15, 2024
1 parent b92ccbe commit 871c832
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 2 additions & 3 deletions epidatpy/_covidcast.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 3 additions & 0 deletions epidatpy/_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from typing import (
Final,
List,
Literal,
Mapping,
Optional,
Sequence,
Expand All @@ -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]
Expand Down

0 comments on commit 871c832

Please sign in to comment.