added checks for python3.8 or lower since ast_comments.unparse() needs python 3.9 or higher.
testing with python 3.8 would make the build fail tests, skipping it there.
This commit is contained in:
parent
1bb697e58c
commit
bfc7f48f17
@ -1,4 +1,5 @@
|
|||||||
import logging
|
import logging
|
||||||
|
import sys
|
||||||
import time
|
import time
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Any, Dict
|
from typing import Any, Dict
|
||||||
@ -19,6 +20,12 @@ def start_strategy_update(args: Dict[str, Any]) -> None:
|
|||||||
:return: None
|
:return: None
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
if sys.version_info <= (3, 8):
|
||||||
|
print("This code requires Python 3.9 or higher. "
|
||||||
|
"We cannot continue. "
|
||||||
|
"Please upgrade your python version to use this command.")
|
||||||
|
|
||||||
|
else:
|
||||||
config = setup_utils_configuration(args, RunMode.UTIL_NO_EXCHANGE)
|
config = setup_utils_configuration(args, RunMode.UTIL_NO_EXCHANGE)
|
||||||
|
|
||||||
strategy_objs = StrategyResolver.search_all_objects(
|
strategy_objs = StrategyResolver.search_all_objects(
|
||||||
|
@ -1,9 +1,14 @@
|
|||||||
# pragma pylint: disable=missing-docstring, protected-access, invalid-name
|
# pragma pylint: disable=missing-docstring, protected-access, invalid-name
|
||||||
|
|
||||||
|
import sys
|
||||||
|
|
||||||
from freqtrade.strategy.strategyupdater import StrategyUpdater
|
from freqtrade.strategy.strategyupdater import StrategyUpdater
|
||||||
|
|
||||||
|
|
||||||
def test_strategy_updater(default_conf, caplog) -> None:
|
def test_strategy_updater(default_conf, caplog) -> None:
|
||||||
|
if sys.version_info <= (3, 8):
|
||||||
|
print("skipped tests since python version is 3.8 or lower.")
|
||||||
|
else:
|
||||||
instance_strategy_updater = StrategyUpdater()
|
instance_strategy_updater = StrategyUpdater()
|
||||||
modified_code1 = instance_strategy_updater.update_code("""
|
modified_code1 = instance_strategy_updater.update_code("""
|
||||||
class testClass(IStrategy):
|
class testClass(IStrategy):
|
||||||
|
Loading…
Reference in New Issue
Block a user