Fix review comments

This commit is contained in:
Anton
2018-06-06 00:14:28 +03:00
parent 3030bf9778
commit 12d8a8b1a3
3 changed files with 14 additions and 8 deletions

View File

@@ -239,17 +239,15 @@ class Arguments(object):
stop: Optional[int] = None
if stype[0]:
starts = rvals[index]
if stype[0] == 'date':
start = int(starts) if len(starts) == 10 \
else arrow.get(starts, 'YYYYMMDD').timestamp
if stype[0] == 'date' and len(starts) == 8:
start = arrow.get(starts, 'YYYYMMDD').timestamp
else:
start = int(starts)
index += 1
if stype[1]:
stops = rvals[index]
if stype[1] == 'date':
stop = int(stops) if len(stops) == 10 \
else arrow.get(stops, 'YYYYMMDD').timestamp
if stype[1] == 'date' and len(stops) == 8:
stop = arrow.get(stops, 'YYYYMMDD').timestamp
else:
stop = int(stops)
return stype, start, stop