my.location.home: simplify config format, make it a bit more robust + tests
This commit is contained in:
parent
d8ed780e36
commit
4666378f7e
3 changed files with 68 additions and 34 deletions
|
@ -33,6 +33,12 @@ class bluemaestro:
|
|||
class google:
|
||||
takeout_path: Paths = ''
|
||||
|
||||
|
||||
from typing import Sequence, Union, Tuple
|
||||
from datetime import datetime, date
|
||||
DateIsh = Union[datetime, date, str]
|
||||
LatLon = Tuple[float, float]
|
||||
class location:
|
||||
class home:
|
||||
current = (1.0, -1.0)
|
||||
# todo ugh, need to think about it... mypy wants the type here to be general, otherwise it can't deduce
|
||||
# and we can't import the types from the module itself, otherwise would be circular. common module?
|
||||
home: Union[LatLon, Sequence[Tuple[DateIsh, LatLon]]] = (1.0, -1.0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue