kwargs for re.sub count

This commit is contained in:
Matthias
2024-04-24 07:02:26 +02:00
parent fa6c17c067
commit 365b9c9cfe

View File

@@ -302,8 +302,8 @@ class IDataHandler(ABC):
Rebuild pair name from filename
Assumes a asset name of max. 7 length to also support BTC-PERP and BTC-PERP:USD names.
"""
res = re.sub(r'^(([A-Za-z\d]{1,10})|^([A-Za-z\-]{1,6}))(_)', r'\g<1>/', pair, 1)
res = re.sub('_', ':', res, 1)
res = re.sub(r'^(([A-Za-z\d]{1,10})|^([A-Za-z\-]{1,6}))(_)', r'\g<1>/', pair, count=1)
res = re.sub('_', ':', res, count=1)
return res
def ohlcv_load(self, pair, timeframe: str,