mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
rpc type hints
This commit is contained in:
parent
4733aad7ff
commit
0d251cbfdd
|
@ -1,6 +1,7 @@
|
|||
"""
|
||||
This module contains class to manage RPC communications (Telegram, Slack, ...)
|
||||
"""
|
||||
from typing import Any, Optional, List
|
||||
import logging
|
||||
|
||||
from freqtrade.rpc.telegram import Telegram
|
||||
|
@ -21,8 +22,8 @@ class RPCManager(object):
|
|||
"""
|
||||
self.freqtrade = freqtrade
|
||||
|
||||
self.registered_modules = []
|
||||
self.telegram = None
|
||||
self.registered_modules: List[str] = []
|
||||
self.telegram: Any = None
|
||||
self._init()
|
||||
|
||||
def _init(self) -> None:
|
||||
|
|
|
@ -18,7 +18,7 @@ from freqtrade.rpc.rpc import RPC
|
|||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def authorized_only(command_handler: Callable[[Bot, Update], None]) -> Callable[..., Any]:
|
||||
def authorized_only(command_handler: Callable[[Any, Bot, Update], None]) -> Callable[..., Any]:
|
||||
"""
|
||||
Decorator to check if the message comes from the correct chat_id
|
||||
:param command_handler: Telegram CommandHandler
|
||||
|
@ -65,7 +65,7 @@ class Telegram(RPC):
|
|||
"""
|
||||
super().__init__(freqtrade)
|
||||
|
||||
self._updater = None
|
||||
self._updater: Updater = None
|
||||
self._config = freqtrade.config
|
||||
self._init()
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user