Update type hints
This commit is contained in:
@@ -8,6 +8,7 @@ import json
|
||||
import os
|
||||
from abc import ABC
|
||||
from collections.abc import Callable
|
||||
from typing import Any
|
||||
|
||||
import aiohttp
|
||||
import flanautils
|
||||
@@ -23,7 +24,7 @@ from flanabot.models import Chat, Message
|
||||
# ---------------------------------------------------- #
|
||||
def preprocess_btc_offers(func: Callable) -> Callable:
|
||||
@functools.wraps(func)
|
||||
async def wrapper(self: BtcOffersBot, message: Message):
|
||||
async def wrapper(self: BtcOffersBot, message: Message) -> Any:
|
||||
if message.chat.is_group and not self.is_bot_mentioned(message):
|
||||
return
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ __all__ = ['whitelisted', 'FlanaTeleBot']
|
||||
|
||||
import functools
|
||||
import os
|
||||
from typing import Callable
|
||||
from typing import Any, Callable
|
||||
|
||||
import telethon.tl.functions
|
||||
from flanautils import Media, OrderedSet
|
||||
@@ -21,7 +21,7 @@ from flanabot.models import Message
|
||||
def whitelisted(func: Callable) -> Callable:
|
||||
@functools.wraps(func)
|
||||
@find_message
|
||||
async def wrapper(self: FlanaTeleBot, message: Message, *args, **kwargs):
|
||||
async def wrapper(self: FlanaTeleBot, message: Message, *args, **kwargs) -> Any:
|
||||
if message.author.id not in self.whitelist_ids:
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user