Follow PEP 484 - no implicit optionals

This commit is contained in:
Matthias
2023-01-21 15:01:56 +01:00
parent bb355cfac5
commit 8108a48f39
24 changed files with 80 additions and 67 deletions

View File

@@ -945,7 +945,7 @@ class RPC:
resp['errors'] = errors
return resp
def _rpc_blacklist(self, add: List[str] = None) -> Dict:
def _rpc_blacklist(self, add: Optional[List[str]] = None) -> Dict:
""" Returns the currently active blacklist"""
errors = {}
if add:

View File

@@ -1605,7 +1605,7 @@ class Telegram(RPCHandler):
def _send_msg(self, msg: str, parse_mode: str = ParseMode.MARKDOWN,
disable_notification: bool = False,
keyboard: List[List[InlineKeyboardButton]] = None,
keyboard: Optional[List[List[InlineKeyboardButton]]] = None,
callback_path: str = "",
reload_able: bool = False,
query: Optional[CallbackQuery] = None) -> None: