core: add hpi query command (#157)
- restructure query code for cli, some test fixes - initial query_range implementation refactored functions in query some more to allow re-use in range_range, select() pretty much just calls out to a bunch of handlers now
This commit is contained in:
parent
b94120deaf
commit
fb49243005
11 changed files with 902 additions and 134 deletions
|
@ -352,21 +352,12 @@ class classproperty(Generic[_R]):
|
|||
tzdatetime = datetime
|
||||
|
||||
|
||||
fromisoformat: Callable[[str], datetime]
|
||||
import sys
|
||||
if sys.version_info[:2] >= (3, 7):
|
||||
# prevent mypy on py3.6 from complaining...
|
||||
fromisoformat_real = datetime.fromisoformat
|
||||
fromisoformat = fromisoformat_real
|
||||
else:
|
||||
from .py37 import fromisoformat
|
||||
|
||||
|
||||
# TODO doctests?
|
||||
def isoparse(s: str) -> tzdatetime:
|
||||
"""
|
||||
Parses timestamps formatted like 2020-05-01T10:32:02.925961Z
|
||||
"""
|
||||
from .compat import fromisoformat
|
||||
# TODO could use dateutil? but it's quite slow as far as I remember..
|
||||
# TODO support non-utc.. somehow?
|
||||
assert s.endswith('Z'), s
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue