Преглед изворни кода

refactor(routers-builder): update transport module imports

Librellium пре 1 недеља
родитељ
комит
7d528f0a9e
2 измењених фајлова са 8 додато и 7 уклоњено
  1. 4 0
      anonflow/bot/builders/__init__.py
  2. 4 7
      anonflow/bot/builders/routers.py

+ 4 - 0
anonflow/bot/builders/__init__.py

@@ -0,0 +1,4 @@
+from .middlewares import build_middlewares
+from .routers import build_routers
+
+__all__ = ["build_middlewares", "build_routers"]

+ 4 - 7
anonflow/bot/builders/routers.py

@@ -1,16 +1,13 @@
 from aiogram import Router
 
+from anonflow.bot.routers import MediaRouter, StartRouter, TextRouter
+from anonflow.bot.transport import ResponsesRouter
 from anonflow.config import Config
 from anonflow.moderation import ModerationService
-from anonflow.services import ModeratorService, ResponsesRouter, UserService
+from anonflow.services import ModeratorService, UserService
 
-from anonflow.bot.routers import (
-    MediaRouter,
-    StartRouter,
-    TextRouter
-)
 
-def build(
+def build_routers(
     config: Config,
     responses_router: ResponsesRouter,
     user_service: UserService,