kwargs error

kwargs error


async def _send_to_admin_chat(bot:Bot, text:str, **kwargs) -> bool:
    """
    This will try to send a notification or text to a admin account
    or a nofication group / channel based on admin wants.
    """
    chat_id = settings.bot.notification_chat_id

    if not chat_id:
        RanaLogger.warning("I should to have chat id to send to admin chat")
        return False

    try:
        await bot.send_message(chat_id=chat_id, text=text, **kwargs)
        return True

    except TelegramError as e:
        RanaLogger.warning(f"Notification for admin chatFailed, {e}")
        return False



First line on function definition: **kwargs:->

Type of parameter "kwargs" is unknownPylancereportUnknownParameterType

Type annotation is missing for parameter "kwargs"PylancereportMissingParameterType

(parameter) kwargs: dict[str, Unknown]



on this line it say this error:
await bot.send_message(chat_id=chat_id, text=text, **kwargs)

Argument type is unknown

 Argument corresponds to parameter "parse_mode" in function "send_message"PylancereportUnknownArgumentType

Argument type is unknown

 Argument corresponds to parameter "entities" in function "send_message"PylancereportUnknownArgumentType

Argument type is unknown

 Argument corresponds to parameter "disable_notification" in function "send_message"PylancereportUnknownArgumentType

Argument type is unknown

 Argument corresponds to parameter "protect_content" in function "send_message"PylancereportUnknownArgumentType

Argument type is unknown

 Argument corresponds to parameter "reply_markup" in function "send_message"PylancereportUnknownArgumentType

Argument type is unknown

 Argument corresponds to parameter "message_thread_id" in function "send_message"PylancereportUnknownArgumentType

Argument type is unknown

 Argument corresponds to parameter "link_preview_options" in function "send_message"PylancereportUnknownArgumentType

Argument type is unknown

 Argument corresponds to parameter "reply_parameters" in function "send_message"PylancereportUnknownArgumentType

Argument type is unknown

 Argument corresponds to parameter "business_connection_id" in function "send_message"PylancereportUnknownArgumentType

Argument type is unknown

 Argument corresponds to parameter "message_effect_id" in function "send_message"PylancereportUnknownArgumentType

Argument type is unknown

 Argument corresponds to parameter "allow_paid_broadcast" in function "send_message"PylancereportUnknownArgumentType

Argument type is unknown

 Argument corresponds to parameter "direct_messages_topic_id" in function "send_message"PylancereportUnknownArgumentType

Argument type is unknown

 Argument corresponds to parameter "suggested_post_parameters" in function "send_message"PylancereportUnknownArgumentType

Argument type is unknown

 Argument corresponds to parameter "allow_sending_without_reply" in function "send_message"PylancereportUnknownArgumentType

Argument type is unknown

 Argument corresponds to parameter "reply_to_message_id" in function "send_message"PylancereportUnknownArgumentType

Argument type is unknown

 Argument corresponds to parameter "disable_web_page_preview" in function "send_message"PylancereportUnknownArgumentType

Argument type is unknown

 Argument corresponds to parameter "read_timeout" in function "send_message"PylancereportUnknownArgumentType

Argument type is unknown

 Argument corresponds to parameter "write_timeout" in function "send_message"PylancereportUnknownArgumentType

Argument type is unknown

 Argument corresponds to parameter "connect_timeout" in function "send_message"PylancereportUnknownArgumentType

Argument type is unknown

 Argument corresponds to parameter "pool_timeout" in function "send_message"PylancereportUnknownArgumentType

Argument type is unknown

 Argument corresponds to parameter "api_kwargs" in function "send_message"PylancereportUnknownArgumentType

(parameter) kwargs: dict[str, Unknown]

Report Page