From d3079ccaa2ad193b5be91d6bac2f107facb77afb Mon Sep 17 00:00:00 2001 From: ShowierData9978 Date: Sun, 5 Nov 2023 21:15:04 -0600 Subject: [PATCH] testing --- MeowerBot/context.py | 15 +++++---------- docs/source/MeowerBot.Bot.rst | 4 ++-- docs/source/MeowerBot.rst | 2 +- 3 files changed, 8 insertions(+), 13 deletions(-) diff --git a/MeowerBot/context.py b/MeowerBot/context.py index 6c57ca1..8639050 100644 --- a/MeowerBot/context.py +++ b/MeowerBot/context.py @@ -1,10 +1,5 @@ from datetime import datetime -from typing import TYPE_CHECKING - -if TYPE_CHECKING: - from .bot import Bot - from .data.api.chats import ChatGroup from .data.api.user import User as RawUser from .api.shared import api_resp @@ -13,9 +8,9 @@ class PartialChat: - def __init__(self, id, bot: "Bot"): + def __init__(self, id, bot): self.id = id - self.bot: "Bot" = bot + self.bot = bot async def send_msg(self, message) -> Optional["Post"]: data, status = await self.bot.api.send_post(self.id, message) @@ -34,7 +29,7 @@ async def fetch(self) -> Optional["Chat"]: class Chat(PartialChat): - def __init__(self, data: ChatGroup, bot: "Bot"): + def __init__(self, data: ChatGroup, bot): super().__init__(data._id, bot) self.created = data.created @@ -49,7 +44,7 @@ def __init__(self, data: ChatGroup, bot: "Bot"): class PartialUser: - def __init__(self, username: str, bot: "Bot"): + def __init__(self, username: str, bot): self.username: str = username self.bot = bot @@ -81,7 +76,7 @@ def __init__(self, username, bot, data: RawUser): class Post: - def __init__(self, bot: "Bot", _raw: dict, chat): + def __init__(self, bot, _raw: dict, chat): self.bot = bot self._raw = _raw self.user: PartialUser | User = PartialUser(self._raw["u"], bot) diff --git a/docs/source/MeowerBot.Bot.rst b/docs/source/MeowerBot.Bot.rst index a633f3d..20b0a24 100644 --- a/docs/source/MeowerBot.Bot.rst +++ b/docs/source/MeowerBot.Bot.rst @@ -1,7 +1,7 @@ -MeowerBot.Bot module +MeowerBot.bot module ==================== -.. automodule:: MeowerBot.Bot +.. automodule:: MeowerBot.bot :members: :undoc-members: :show-inheritance: diff --git a/docs/source/MeowerBot.rst b/docs/source/MeowerBot.rst index 29a557d..b6114de 100644 --- a/docs/source/MeowerBot.rst +++ b/docs/source/MeowerBot.rst @@ -16,7 +16,7 @@ Submodules .. toctree:: :maxdepth: 4 - MeowerBot.Bot + MeowerBot.bot MeowerBot.cog MeowerBot.command MeowerBot.context