More candletype changes

This commit is contained in:
Matthias
2021-12-03 13:04:31 +01:00
parent f33643cacf
commit 5493212672
8 changed files with 33 additions and 14 deletions

View File

@@ -36,8 +36,12 @@ class HDF5DataHandler(IDataHandler):
cls._OHLCV_REGEX, p.name
) for p in datadir.glob("*.h5")
]
return [(cls.rebuild_pair_from_filename(match[1]), match[2], match[3]) for match in _tmp
if match and len(match.groups()) > 1]
return [
(
cls.rebuild_pair_from_filename(match[1]),
match[2],
CandleType.from_string(match[3])
) for match in _tmp if match and len(match.groups()) > 1]
@classmethod
def ohlcv_get_pairs(

View File

@@ -37,8 +37,12 @@ class JsonDataHandler(IDataHandler):
re.search(
cls._OHLCV_REGEX, p.name
) for p in datadir.glob(f"*.{cls._get_file_extension()}")]
return [(cls.rebuild_pair_from_filename(match[1]), match[2], match[3]) for match in _tmp
if match and len(match.groups()) > 1]
return [
(
cls.rebuild_pair_from_filename(match[1]),
match[2],
CandleType.from_string(match[3])
) for match in _tmp if match and len(match.groups()) > 1]
@classmethod
def ohlcv_get_pairs(