Fix Flake8 errors after flake update

This commit is contained in:
Matthias
2022-08-01 06:43:59 +02:00
parent b4ded59c63
commit d75e0a9820
5 changed files with 9 additions and 9 deletions

View File

@@ -595,7 +595,7 @@ class Backtesting:
if exit_.exit_type in (ExitType.EXIT_SIGNAL, ExitType.CUSTOM_EXIT):
# Checks and adds an exit tag, after checking that the length of the
# row has the length for an exit tag column
if(
if (
len(row) > EXIT_TAG_IDX
and row[EXIT_TAG_IDX] is not None
and len(row[EXIT_TAG_IDX]) > 0

View File

@@ -639,7 +639,7 @@ def text_table_tags(tag_type: str, tag_results: List[Dict[str, Any]], stake_curr
:param stake_currency: stake-currency - used to correctly name headers
:return: pretty printed table with tabulate as string
"""
if(tag_type == "enter_tag"):
if (tag_type == "enter_tag"):
headers = _get_line_header("TAG", stake_currency)
else:
headers = _get_line_header("TAG", stake_currency, 'Sells')

View File

@@ -1300,7 +1300,7 @@ class Trade(_DECL_BASE, LocalTrade):
"""
filters = [Trade.is_open.is_(False)]
if(pair is not None):
if (pair is not None):
filters.append(Trade.pair == pair)
enter_tag_perf = Trade.query.with_entities(
@@ -1333,7 +1333,7 @@ class Trade(_DECL_BASE, LocalTrade):
"""
filters = [Trade.is_open.is_(False)]
if(pair is not None):
if (pair is not None):
filters.append(Trade.pair == pair)
sell_tag_perf = Trade.query.with_entities(
@@ -1366,7 +1366,7 @@ class Trade(_DECL_BASE, LocalTrade):
"""
filters = [Trade.is_open.is_(False)]
if(pair is not None):
if (pair is not None):
filters.append(Trade.pair == pair)
mix_tag_perf = Trade.query.with_entities(
@@ -1386,7 +1386,7 @@ class Trade(_DECL_BASE, LocalTrade):
enter_tag = enter_tag if enter_tag is not None else "Other"
exit_reason = exit_reason if exit_reason is not None else "Other"
if(exit_reason is not None and enter_tag is not None):
if (exit_reason is not None and enter_tag is not None):
mix_tag = enter_tag + " " + exit_reason
i = 0
if not any(item["mix_tag"] == mix_tag for item in return_list):