Declare type of 'dur'.
This commit is contained in:
parent
355afc082e
commit
1c27aaab72
@ -6,7 +6,7 @@ This module manage Telegram communication
|
|||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
import arrow
|
import arrow
|
||||||
from typing import Any, Callable, Dict
|
from typing import Any, Callable, Dict, List
|
||||||
|
|
||||||
from tabulate import tabulate
|
from tabulate import tabulate
|
||||||
from telegram import ParseMode, ReplyKeyboardMarkup, Update
|
from telegram import ParseMode, ReplyKeyboardMarkup, Update
|
||||||
@ -780,7 +780,7 @@ class Telegram(RPC):
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Duration
|
# Duration
|
||||||
dur = {'Wins': [], 'Draws': [], 'Losses': []}
|
dur: Dict[str, List[int]] = {'Wins': [], 'Draws': [], 'Losses': []}
|
||||||
for trade in trades_closed:
|
for trade in trades_closed:
|
||||||
if trade['close_date'] is not None and trade['open_date'] is not None:
|
if trade['close_date'] is not None and trade['open_date'] is not None:
|
||||||
trade_dur = arrow.get(trade['close_date']) - arrow.get(trade['open_date'])
|
trade_dur = arrow.get(trade['close_date']) - arrow.get(trade['open_date'])
|
||||||
|
Loading…
Reference in New Issue
Block a user