From 16cb44591ca39636218ca8e55b3cb31dea6ff262 Mon Sep 17 00:00:00 2001 From: qwerdvd <105906879+qwerdvd@users.noreply.github.com> Date: Mon, 4 Dec 2023 12:36:08 +0800 Subject: [PATCH] fix: remove unnecessary imports in wiki --- ArknightsUID/arknightsuid_wiki/__init__.py | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/ArknightsUID/arknightsuid_wiki/__init__.py b/ArknightsUID/arknightsuid_wiki/__init__.py index 9c89362..545d4b2 100644 --- a/ArknightsUID/arknightsuid_wiki/__init__.py +++ b/ArknightsUID/arknightsuid_wiki/__init__.py @@ -1,11 +1,7 @@ -import asyncio import re -from pathlib import Path from gsuid_core.bot import Bot -from gsuid_core.data_store import get_res_path from gsuid_core.models import Event -from gsuid_core.plugins.ArknightsUID.ArknightsUID.arknightsuid_resource.memoryStore import store from gsuid_core.plugins.ArknightsUID.ArknightsUID.arknightsuid_wiki.draw_wiki_img import ( get_equip_info, get_wiki_info, @@ -58,17 +54,6 @@ async def send_role_wiki_pic(bot: Bot, ev: Event): async def send_equip_wiki_pic(bot: Bot, ev: Event): char_name = ' '.join(re.findall('[\u4e00-\u9fa5]+', ev.text)) - try: - CHARACTER_TABLE = Excel.CHARATER_TABLE - except AttributeError: - TASK = [] - for file_path in Path( - get_res_path(["ArknightsUID", "resource", "gamedata"]) - ).glob("*.json"): - TASK.append(store.get_file(file_path)) - asyncio.gather(*TASK) - - await Excel.preload_table() CHARACTER_TABLE = Excel.CHARATER_TABLE char_id = None