mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-11-29 16:43:06 +00:00
chore: fix RUF043 violations
This commit is contained in:
@@ -658,7 +658,9 @@ def test_start_new_strategy_no_arg():
|
||||
args = [
|
||||
"new-strategy",
|
||||
]
|
||||
with pytest.raises(OperationalException, match="`new-strategy` requires --strategy to be set."):
|
||||
with pytest.raises(
|
||||
OperationalException, match=r"`new-strategy` requires --strategy to be set\."
|
||||
):
|
||||
start_new_strategy(get_args(args))
|
||||
|
||||
|
||||
@@ -803,7 +805,7 @@ def test_get_ui_download_url_direct(mocker):
|
||||
assert last_version == "0.0.1"
|
||||
assert x == "http://download1.zip"
|
||||
|
||||
with pytest.raises(ValueError, match="UI-Version not found."):
|
||||
with pytest.raises(ValueError, match=r"UI-Version not found\."):
|
||||
x, last_version = get_ui_download_url("0.0.3", False)
|
||||
|
||||
|
||||
@@ -1650,7 +1652,7 @@ def test_hyperopt_show(mocker, capsys):
|
||||
pargs = get_args(args)
|
||||
pargs["config"] = None
|
||||
with pytest.raises(
|
||||
OperationalException, match="The index of the epoch to show should be greater than -4."
|
||||
OperationalException, match=r"The index of the epoch to show should be greater than -4\."
|
||||
):
|
||||
start_hyperopt_show(pargs)
|
||||
|
||||
@@ -1658,7 +1660,7 @@ def test_hyperopt_show(mocker, capsys):
|
||||
pargs = get_args(args)
|
||||
pargs["config"] = None
|
||||
with pytest.raises(
|
||||
OperationalException, match="The index of the epoch to show should be less than 4."
|
||||
OperationalException, match=r"The index of the epoch to show should be less than 4\."
|
||||
):
|
||||
start_hyperopt_show(pargs)
|
||||
|
||||
@@ -2032,5 +2034,7 @@ def test_start_edge():
|
||||
]
|
||||
|
||||
pargs = get_args(args)
|
||||
with pytest.raises(OperationalException, match="The Edge module has been deprecated in 2023.9"):
|
||||
with pytest.raises(
|
||||
OperationalException, match=r"The Edge module has been deprecated in 2023\.9"
|
||||
):
|
||||
start_edge(pargs)
|
||||
|
||||
Reference in New Issue
Block a user