mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
use of termcolor eliminated
This commit is contained in:
parent
9cbab35de0
commit
ae39f6fba5
|
@ -14,11 +14,11 @@ from pprint import pprint
|
|||
from typing import Any, Dict, List, Optional
|
||||
|
||||
from colorama import init as colorama_init
|
||||
from colorama import Fore, Style
|
||||
from joblib import Parallel, delayed, dump, load, wrap_non_picklable_objects, cpu_count
|
||||
from pandas import DataFrame
|
||||
from skopt import Optimizer
|
||||
from skopt.space import Dimension
|
||||
from termcolor import colored
|
||||
|
||||
from freqtrade.configuration import Arguments
|
||||
from freqtrade.data.history import load_data, get_timeframe
|
||||
|
@ -163,11 +163,11 @@ class Hyperopt(Backtesting):
|
|||
# Colorize output
|
||||
if self.config.get('print_colorized', False):
|
||||
if results['total_profit'] > 0:
|
||||
log_str = colored(log_str, attrs=['bold'])
|
||||
log_str = Style.BRIGHT + log_str
|
||||
if results['loss'] >= MAX_LOSS:
|
||||
log_str = colored(log_str, 'red')
|
||||
log_str = Fore.RED + log_str
|
||||
elif is_best_loss:
|
||||
log_str = colored(log_str, 'green')
|
||||
log_str = Fore.GREEN + log_str
|
||||
if print_all:
|
||||
print(log_str)
|
||||
else:
|
||||
|
@ -355,7 +355,8 @@ class Hyperopt(Backtesting):
|
|||
|
||||
opt = self.get_optimizer(config_jobs)
|
||||
|
||||
colorama_init()
|
||||
if self.config.get('print_colorized', False):
|
||||
colorama_init(autoreset=True)
|
||||
|
||||
try:
|
||||
with Parallel(n_jobs=config_jobs) as parallel:
|
||||
|
|
|
@ -32,5 +32,4 @@ sdnotify==0.3.2
|
|||
flask==1.1.1
|
||||
|
||||
# Support for colorized terminal output
|
||||
termcolor==1.1.0
|
||||
colorama==0.4.1
|
||||
|
|
Loading…
Reference in New Issue
Block a user