diff --git a/apps/admin/services.py b/apps/admin/services.py index c59370fb..e22e7648 100644 --- a/apps/admin/services.py +++ b/apps/admin/services.py @@ -3,10 +3,10 @@ from typing import List from pymysql import IntegrityError from telegram import Bot -from cache import BotAdminCache, GroupAdminCache from config import config from logger import Log -from repositories import BotAdminRepository +from .cache import BotAdminCache, GroupAdminCache +from .repositories import BotAdminRepository class BotAdminService: diff --git a/main.py b/main.py index 5f391b52..16a8b590 100644 --- a/main.py +++ b/main.py @@ -4,11 +4,11 @@ from warnings import filterwarnings import pytz from telegram.ext import Application, Defaults from telegram.warnings import PTBUserWarning -from utils.app.manager import AppsManager from config import config from logger import Log from utils.aiobrowser import AioBrowser +from utils.apps.manager import AppsManager from utils.job.register import register_job from utils.mysql import MySQL from utils.plugins.register import register_plugin_handlers diff --git a/utils/apps/inject.py b/utils/apps/inject.py index a2f323dd..4000ec67 100644 --- a/utils/apps/inject.py +++ b/utils/apps/inject.py @@ -1,10 +1,9 @@ import inspect from functools import wraps -from utils.app.manager import ServiceDict - from logger import Log from models.types import Func +from utils.apps.manager import ServiceDict def get_injections(func: Func): diff --git a/utils/apps/manager.py b/utils/apps/manager.py index 2561e71e..b657086b 100644 --- a/utils/apps/manager.py +++ b/utils/apps/manager.py @@ -54,7 +54,7 @@ class AppsManager: for app_name in self.app_list: if app_name not in self.exclude_list: try: - import_module(f"app.{app_name}") + import_module(f"apps.{app_name}") except ImportError as exc: Log.warning(f"Service模块 {app_name} 导入失败", exc) except ImportWarning as exc: