Fix mypy type errors
This commit is contained in:
parent
17432b2823
commit
22dd2ca003
@ -165,7 +165,7 @@ def generate_tag_metrics(tag_type: str,
|
|||||||
tabular_data.append(_generate_result_line(results, starting_balance, 'TOTAL'))
|
tabular_data.append(_generate_result_line(results, starting_balance, 'TOTAL'))
|
||||||
return tabular_data
|
return tabular_data
|
||||||
else:
|
else:
|
||||||
return None
|
return []
|
||||||
|
|
||||||
|
|
||||||
def _generate_tag_result_line(result: DataFrame, starting_balance: int, first_column: str) -> Dict:
|
def _generate_tag_result_line(result: DataFrame, starting_balance: int, first_column: str) -> Dict:
|
||||||
|
@ -861,7 +861,7 @@ class Trade(_DECL_BASE, LocalTrade):
|
|||||||
]
|
]
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_buy_tag_performance(pair: str) -> List[Dict[str, Any]]:
|
def get_buy_tag_performance(pair: Optional[str]) -> List[Dict[str, Any]]:
|
||||||
"""
|
"""
|
||||||
Returns List of dicts containing all Trades, based on buy tag performance
|
Returns List of dicts containing all Trades, based on buy tag performance
|
||||||
Can either be average for all pairs or a specific pair provided
|
Can either be average for all pairs or a specific pair provided
|
||||||
@ -900,7 +900,7 @@ class Trade(_DECL_BASE, LocalTrade):
|
|||||||
]
|
]
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_sell_reason_performance(pair: str) -> List[Dict[str, Any]]:
|
def get_sell_reason_performance(pair: Optional[str]) -> List[Dict[str, Any]]:
|
||||||
"""
|
"""
|
||||||
Returns List of dicts containing all Trades, based on sell reason performance
|
Returns List of dicts containing all Trades, based on sell reason performance
|
||||||
Can either be average for all pairs or a specific pair provided
|
Can either be average for all pairs or a specific pair provided
|
||||||
@ -938,7 +938,7 @@ class Trade(_DECL_BASE, LocalTrade):
|
|||||||
]
|
]
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_mix_tag_performance(pair: str) -> List[Dict[str, Any]]:
|
def get_mix_tag_performance(pair: Optional[str]) -> List[Dict[str, Any]]:
|
||||||
"""
|
"""
|
||||||
Returns List of dicts containing all Trades, based on buy_tag + sell_reason performance
|
Returns List of dicts containing all Trades, based on buy_tag + sell_reason performance
|
||||||
Can either be average for all pairs or a specific pair provided
|
Can either be average for all pairs or a specific pair provided
|
||||||
|
@ -689,7 +689,7 @@ class RPC:
|
|||||||
[x.update({'profit': round(x['profit'] * 100, 2)}) for x in pair_rates]
|
[x.update({'profit': round(x['profit'] * 100, 2)}) for x in pair_rates]
|
||||||
return pair_rates
|
return pair_rates
|
||||||
|
|
||||||
def _rpc_buy_tag_performance(self, pair: str) -> List[Dict[str, Any]]:
|
def _rpc_buy_tag_performance(self, pair: Optional[str]) -> List[Dict[str, Any]]:
|
||||||
"""
|
"""
|
||||||
Handler for buy tag performance.
|
Handler for buy tag performance.
|
||||||
Shows a performance statistic from finished trades
|
Shows a performance statistic from finished trades
|
||||||
@ -699,7 +699,7 @@ class RPC:
|
|||||||
[x.update({'profit': round(x['profit'] * 100, 2)}) for x in buy_tags]
|
[x.update({'profit': round(x['profit'] * 100, 2)}) for x in buy_tags]
|
||||||
return buy_tags
|
return buy_tags
|
||||||
|
|
||||||
def _rpc_sell_reason_performance(self, pair: str) -> List[Dict[str, Any]]:
|
def _rpc_sell_reason_performance(self, pair: Optional[str]) -> List[Dict[str, Any]]:
|
||||||
"""
|
"""
|
||||||
Handler for sell reason performance.
|
Handler for sell reason performance.
|
||||||
Shows a performance statistic from finished trades
|
Shows a performance statistic from finished trades
|
||||||
@ -709,7 +709,7 @@ class RPC:
|
|||||||
[x.update({'profit': round(x['profit'] * 100, 2)}) for x in sell_reasons]
|
[x.update({'profit': round(x['profit'] * 100, 2)}) for x in sell_reasons]
|
||||||
return sell_reasons
|
return sell_reasons
|
||||||
|
|
||||||
def _rpc_mix_tag_performance(self, pair: str) -> List[Dict[str, Any]]:
|
def _rpc_mix_tag_performance(self, pair: Optional[str]) -> List[Dict[str, Any]]:
|
||||||
"""
|
"""
|
||||||
Handler for mix tag (buy_tag + sell_reason) performance.
|
Handler for mix tag (buy_tag + sell_reason) performance.
|
||||||
Shows a performance statistic from finished trades
|
Shows a performance statistic from finished trades
|
||||||
|
Loading…
Reference in New Issue
Block a user