Standardize import order in handler modules

- Reorder imports in multiple handler files to follow a consistent pattern
- Move type-specific imports like Message and CallbackQuery to be more organized
- Ensure clean and uniform import statements across admin and handler modules
This commit is contained in:
Zakhar Izmaylov
2025-01-31 03:01:46 +03:00
parent 28e7c78601
commit 3741e4f3bf
8 changed files with 15 additions and 25 deletions
+4 -7
View File
@@ -4,8 +4,9 @@ import asyncpg
from aiogram import F, Router, types
from aiogram.fsm.context import FSMContext
from aiogram.fsm.state import State, StatesGroup
from py3xui import AsyncApi
from aiogram.types import CallbackQuery, Message
from py3xui import AsyncApi
from backup import create_backup_and_send_to_admins
from config import ADMIN_PASSWORD, ADMIN_USERNAME, DATABASE_URL
from database import check_unique_server_name, delete_server, get_servers
@@ -228,9 +229,7 @@ async def handle_inbound_id_input(message: Message, state: FSMContext):
@router.callback_query(AdminServerEditorCallback.filter(F.action == "clusters_manage"), IsAdminFilter())
async def handle_clusters_manage(
callback_query: CallbackQuery, callback_data: AdminServerEditorCallback, session: Any
):
async def handle_clusters_manage(callback_query: CallbackQuery, callback_data: AdminServerEditorCallback, session: Any):
cluster_name = callback_data.data
servers = await get_servers(session)
@@ -354,9 +353,7 @@ async def handle_servers_add(
@router.callback_query(AdminServerEditorCallback.filter(F.action == "clusters_backup"), IsAdminFilter())
async def handle_clusters_backup(
callback_query: CallbackQuery, callback_data: AdminServerEditorCallback, session: Any
):
async def handle_clusters_backup(callback_query: CallbackQuery, callback_data: AdminServerEditorCallback, session: Any):
cluster_name = callback_data.data
servers = await get_servers(session)