fix windows-specific init issue with named tuple

This commit is contained in:
xmatthias 2018-06-08 19:46:07 +02:00
parent 5f93c5e789
commit 8effc5f929
2 changed files with 3 additions and 3 deletions

View File

@ -243,7 +243,7 @@ class Arguments(object):
:return: Start and End range period :return: Start and End range period
""" """
if text is None: if text is None:
return TimeRange() return TimeRange(None, None, 0, 0)
syntax = [(r'^-(\d{8})$', (None, 'date')), syntax = [(r'^-(\d{8})$', (None, 'date')),
(r'^(\d{8})-$', ('date', None)), (r'^(\d{8})-$', ('date', None)),
(r'^(\d{8})-(\d{8})$', ('date', 'date')), (r'^(\d{8})-(\d{8})$', ('date', 'date')),

View File

@ -85,7 +85,7 @@ def load_data(datadir: str,
ticker_interval: str, ticker_interval: str,
pairs: Optional[List[str]] = None, pairs: Optional[List[str]] = None,
refresh_pairs: Optional[bool] = False, refresh_pairs: Optional[bool] = False,
timerange: TimeRange = TimeRange()) -> Dict[str, List]: timerange: TimeRange = TimeRange(None, None, 0, 0)) -> Dict[str, List]:
""" """
Loads ticker history data for the given parameters Loads ticker history data for the given parameters
:return: dict :return: dict
@ -125,7 +125,7 @@ def make_testdata_path(datadir: str) -> str:
def download_pairs(datadir, pairs: List[str], def download_pairs(datadir, pairs: List[str],
ticker_interval: str, ticker_interval: str,
timerange: TimeRange = TimeRange()) -> bool: timerange: TimeRange = TimeRange(None, None, 0, 0)) -> bool:
"""For each pairs passed in parameters, download the ticker intervals""" """For each pairs passed in parameters, download the ticker intervals"""
for pair in pairs: for pair in pairs:
try: try: