Update type hints

This commit is contained in:
AlberLC
2025-04-17 23:44:16 +02:00
parent fca648f8b5
commit ad2434ab67
2 changed files with 4 additions and 3 deletions

View File

@@ -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

View File

@@ -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