Allow invalid futures pairs (: separated)

closes #9127
This commit is contained in:
Matthias
2023-08-29 17:40:18 +02:00
parent e0e0a25811
commit 5efa40215b
2 changed files with 4 additions and 2 deletions

View File

@@ -30,7 +30,7 @@ def expand_pairlist(wildcardpl: List[str], available_pairs: List[str],
raise ValueError(f"Wildcard error in {pair_wc}, {err}")
for element in result:
if not re.fullmatch(r'^[A-Za-z0-9/-]+$', element):
if not re.fullmatch(r'^[A-Za-z0-9:/-]+$', element):
result.remove(element)
else:
for pair_wc in wildcardpl:

View File

@@ -1370,7 +1370,9 @@ def test_expand_pairlist(wildcardlist, pairs, expected):
(['BTC/USD'],
['BTC/USD', 'BTC/USDT'],
['BTC/USD']),
(['BTC/USDT:USDT'],
['BTC/USDT:USDT', 'BTC/USDT'],
['BTC/USDT:USDT']),
])
def test_expand_pairlist_keep_invalid(wildcardlist, pairs, expected):
if expected is None: