use of termcolor eliminated

This commit is contained in:
hroff-1902 2019-08-09 14:48:57 +03:00
parent 9cbab35de0
commit ae39f6fba5
2 changed files with 6 additions and 6 deletions

View File

@ -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:

View File

@ -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