Skip to content

Commit

Permalink
style: fix ruff issues
Browse files Browse the repository at this point in the history
  • Loading branch information
TimNekk committed Nov 28, 2023
1 parent a75d9c7 commit 5dc0e18
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tgbot/middlewares/subscription.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ async def setup_channels(cls, dp: Dispatcher, channels_ids: list[int]) -> None:
async def on_process_message(self, message: Message, data: dict) -> None:
user = data.get('user')
if not user:
raise KeyError(f"User not found in data")
raise KeyError("User not found in data")

await self.check_subscriptions(message, user=user)

async def on_process_callback_query(self, call: CallbackQuery, data: dict) -> None:
user = data.get('user')
if not user:
raise KeyError(f"User not found in data")
raise KeyError("User not found in data")

await self.check_subscriptions(call.message, user=user,
call=call, callback_data=data.get("callback_data"))
Expand Down
5 changes: 5 additions & 0 deletions tgbot/states/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
from .send_all import SendAllState
from .ping import PingState

__all__ = [
"SendAllState",
"PingState"
]

0 comments on commit 5dc0e18

Please sign in to comment.