Skip to content

Commit

Permalink
chore: fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Kirill Sokolov committed Aug 16, 2024
1 parent cb67858 commit 00c52ce
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 19 deletions.
2 changes: 1 addition & 1 deletion pybotx/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@
from pybotx.models.system_events.cts_login import CTSLoginEvent
from pybotx.models.system_events.cts_logout import CTSLogoutEvent
from pybotx.models.system_events.deleted_from_chat import DeletedFromChatEvent
from pybotx.models.system_events.event_edit import EventEdit
from pybotx.models.system_events.event_delete import EventDelete
from pybotx.models.system_events.event_edit import EventEdit
from pybotx.models.system_events.internal_bot_notification import (
InternalBotNotificationEvent,
)
Expand Down
2 changes: 1 addition & 1 deletion pybotx/bot/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
from pybotx.models.system_events.cts_login import CTSLoginEvent
from pybotx.models.system_events.cts_logout import CTSLogoutEvent
from pybotx.models.system_events.deleted_from_chat import DeletedFromChatEvent
from pybotx.models.system_events.event_edit import EventEdit
from pybotx.models.system_events.event_delete import EventDelete
from pybotx.models.system_events.event_edit import EventEdit
from pybotx.models.system_events.internal_bot_notification import (
InternalBotNotificationEvent,
)
Expand Down
2 changes: 1 addition & 1 deletion pybotx/bot/handler_collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
from pybotx.models.system_events.cts_login import CTSLoginEvent
from pybotx.models.system_events.cts_logout import CTSLogoutEvent
from pybotx.models.system_events.deleted_from_chat import DeletedFromChatEvent
from pybotx.models.system_events.event_edit import EventEdit
from pybotx.models.system_events.event_delete import EventDelete
from pybotx.models.system_events.event_edit import EventEdit
from pybotx.models.system_events.internal_bot_notification import (
InternalBotNotificationEvent,
)
Expand Down
6 changes: 3 additions & 3 deletions pybotx/models/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
BotAPIDeletedFromChat,
DeletedFromChatEvent,
)
from pybotx.models.system_events.event_edit import BotAPIEventEdit, EventEdit
from pybotx.models.system_events.event_delete import BotAPIEventDelete, EventDelete
from pybotx.models.system_events.event_edit import BotAPIEventEdit, EventEdit
from pybotx.models.system_events.internal_bot_notification import (
BotAPIInternalBotNotification,
InternalBotNotificationEvent,
Expand All @@ -46,7 +46,7 @@
BotAPICTSLogin,
BotAPICTSLogout,
BotAPIEventEdit,
BotAPIEventDelete
BotAPIEventDelete,
]
BotAPICommand = Union[BotAPIIncomingMessage, BotAPISystemEvent]

Expand All @@ -62,6 +62,6 @@
CTSLoginEvent,
CTSLogoutEvent,
EventEdit,
EventDelete
EventDelete,
]
BotCommand = Union[IncomingMessage, SystemEvent]
14 changes: 9 additions & 5 deletions pybotx/models/system_events/event_delete.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
from dataclasses import dataclass
from typing import Dict, Any, Literal
from typing import Any, Dict, Literal
from uuid import UUID

from pydantic import Field

from pybotx.models.bot_account import BotAccount
from pybotx.models.api_base import VerifiedPayloadBaseModel
from pybotx.models.base_command import BotCommandBase, BaseBotAPIContext, BotAPIBaseCommand, \
BotAPIBaseSystemEventPayload
from pybotx.models.base_command import (
BaseBotAPIContext,
BotAPIBaseCommand,
BotAPIBaseSystemEventPayload,
BotCommandBase,
)
from pybotx.models.bot_account import BotAccount
from pybotx.models.enums import BotAPISystemEventTypes


Expand Down Expand Up @@ -42,5 +46,5 @@ def to_domain(self, raw_command: Dict[str, Any]) -> EventDelete:
host=self.sender.host,
),
sync_id=self.sync_id,
raw_command=raw_command
raw_command=raw_command,
)
11 changes: 3 additions & 8 deletions tests/system_events/test_event_delete.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,9 @@

import pytest

from pybotx import (
Bot,
BotAccountWithSecret,
HandlerCollector,
lifespan_wrapper,
)
from pybotx.models.system_events.event_delete import EventDelete
from pybotx import Bot, BotAccountWithSecret, HandlerCollector, lifespan_wrapper
from pybotx.models.bot_account import BotAccount
from pybotx.models.system_events.event_delete import EventDelete

pytestmark = [
pytest.mark.asyncio,
Expand All @@ -20,7 +15,7 @@


async def test__chat_deleted_by_user__succeed(
bot_account: BotAccountWithSecret,
bot_account: BotAccountWithSecret,
) -> None:
# - Arrange -
payload = {
Expand Down

0 comments on commit 00c52ce

Please sign in to comment.