Add some type hints

This commit is contained in:
hroff-1902
2020-02-02 07:00:40 +03:00
parent 2396f35586
commit f3d500085c
28 changed files with 114 additions and 100 deletions

View File

@@ -139,7 +139,8 @@ class RPC:
results.append(trade_dict)
return results
def _rpc_status_table(self, stake_currency, fiat_display_currency: str) -> Tuple[List, List]:
def _rpc_status_table(self, stake_currency: str,
fiat_display_currency: str) -> Tuple[List, List]:
trades = Trade.get_open_trades()
if not trades:
raise RPCException('no active trade')
@@ -385,7 +386,7 @@ class RPC:
return {'status': 'No more buy will occur from now. Run /reload_conf to reset.'}
def _rpc_forcesell(self, trade_id) -> Dict[str, str]:
def _rpc_forcesell(self, trade_id: str) -> Dict[str, str]:
"""
Handler for forcesell <id>.
Sells the given trade at current price

View File

@@ -61,7 +61,7 @@ class RPCManager:
except NotImplementedError:
logger.error(f"Message type {msg['type']} not implemented by handler {mod.name}.")
def startup_messages(self, config, pairlist) -> None:
def startup_messages(self, config: Dict[str, Any], pairlist) -> None:
if config['dry_run']:
self.send_msg({
'type': RPCMessageType.WARNING_NOTIFICATION,