diff --git a/apps/cookies/cache.py b/apps/cookies/cache.py index 2824f26..c956601 100644 --- a/apps/cookies/cache.py +++ b/apps/cookies/cache.py @@ -1,6 +1,6 @@ from typing import List, Union -from model.base import RegionEnum +from models.base import RegionEnum from utils.error import RegionNotFoundError from utils.redisdb import RedisDB from .error import CookiesCachePoolExhausted diff --git a/apps/cookies/repositories.py b/apps/cookies/repositories.py index 3a474f8..c3eda03 100644 --- a/apps/cookies/repositories.py +++ b/apps/cookies/repositories.py @@ -3,7 +3,7 @@ from typing import cast, List from sqlalchemy import select from sqlmodel.ext.asyncio.session import AsyncSession -from model.base import RegionEnum +from models.base import RegionEnum from utils.error import NotFoundError, RegionNotFoundError from utils.mysql import MySQL from .models import HyperionCookie, HoyolabCookie, Cookies diff --git a/apps/cookies/services.py b/apps/cookies/services.py index d51fb5e..3105146 100644 --- a/apps/cookies/services.py +++ b/apps/cookies/services.py @@ -4,7 +4,7 @@ import genshin from genshin import types, InvalidCookies, TooManyRequests, GenshinException from logger import Log -from model.base import RegionEnum +from models.base import RegionEnum from .cache import PublicCookiesCache from .models import CookiesStatusEnum from .repositories import CookiesRepository, CookiesNotFoundError diff --git a/apps/game/services.py b/apps/game/services.py index 0f98d0f..18e27fe 100644 --- a/apps/game/services.py +++ b/apps/game/services.py @@ -1,6 +1,6 @@ from typing import List, Optional -from model.apihelper.hyperion import Hyperion +from models.apihelper.hyperion import Hyperion from .cache import GameStrategyCache diff --git a/apps/quiz/models.py b/apps/quiz/models.py index f9d9ac4..e896c11 100644 --- a/apps/quiz/models.py +++ b/apps/quiz/models.py @@ -1,7 +1,7 @@ from typing import List, Optional -from model.baseobject import BaseObject -from model.types import JSONDict +from models.baseobject import BaseObject +from models.types import JSONDict class Answer(BaseObject): diff --git a/apps/wiki/services.py b/apps/wiki/services.py index 85ef886..42bfa9b 100644 --- a/apps/wiki/services.py +++ b/apps/wiki/services.py @@ -3,8 +3,8 @@ import asyncio import ujson from logger import Log -from model.wiki.characters import Characters -from model.wiki.weapons import Weapons +from models.wiki.characters import Characters +from models.wiki.weapons import Weapons from .cache import WikiCache diff --git a/model/README.md b/models/README.md similarity index 100% rename from model/README.md rename to models/README.md diff --git a/model/apihelper/artifact.py b/models/apihelper/artifact.py similarity index 100% rename from model/apihelper/artifact.py rename to models/apihelper/artifact.py diff --git a/model/apihelper/base.py b/models/apihelper/base.py similarity index 100% rename from model/apihelper/base.py rename to models/apihelper/base.py diff --git a/model/apihelper/gacha.py b/models/apihelper/gacha.py similarity index 100% rename from model/apihelper/gacha.py rename to models/apihelper/gacha.py diff --git a/model/apihelper/helpers.py b/models/apihelper/helpers.py similarity index 100% rename from model/apihelper/helpers.py rename to models/apihelper/helpers.py diff --git a/model/apihelper/hoyolab.py b/models/apihelper/hoyolab.py similarity index 100% rename from model/apihelper/hoyolab.py rename to models/apihelper/hoyolab.py diff --git a/model/apihelper/hyperion.py b/models/apihelper/hyperion.py similarity index 100% rename from model/apihelper/hyperion.py rename to models/apihelper/hyperion.py diff --git a/model/apihelper/metadata/CharactersMap.json b/models/apihelper/metadata/CharactersMap.json similarity index 100% rename from model/apihelper/metadata/CharactersMap.json rename to models/apihelper/metadata/CharactersMap.json diff --git a/model/apihelper/metadata/NameTextMapHash.json b/models/apihelper/metadata/NameTextMapHash.json similarity index 100% rename from model/apihelper/metadata/NameTextMapHash.json rename to models/apihelper/metadata/NameTextMapHash.json diff --git a/model/apihelper/metadata/ReliquaryNameMap.json b/models/apihelper/metadata/ReliquaryNameMap.json similarity index 100% rename from model/apihelper/metadata/ReliquaryNameMap.json rename to models/apihelper/metadata/ReliquaryNameMap.json diff --git a/model/apihelper/playercards.py b/models/apihelper/playercards.py similarity index 96% rename from model/apihelper/playercards.py rename to models/apihelper/playercards.py index 4ed2b46..10782ce 100644 --- a/model/apihelper/playercards.py +++ b/models/apihelper/playercards.py @@ -4,13 +4,13 @@ from typing import Union, Optional import httpx import ujson -from model.base import GameItem -from model.game.artifact import ArtifactInfo -from model.game.character import CharacterInfo, CharacterValueInfo -from model.game.fetter import FetterInfo -from model.game.skill import Skill -from model.game.talent import Talent -from model.game.weapon import WeaponInfo +from models.base import GameItem +from models.game.artifact import ArtifactInfo +from models.game.character import CharacterInfo, CharacterValueInfo +from models.game.fetter import FetterInfo +from models.game.skill import Skill +from models.game.talent import Talent +from models.game.weapon import WeaponInfo from .helpers import get_headers diff --git a/model/base.py b/models/base.py similarity index 97% rename from model/base.py rename to models/base.py index 703caae..5b2e21d 100644 --- a/model/base.py +++ b/models/base.py @@ -2,7 +2,7 @@ import imghdr from enum import Enum from typing import Union -from model.baseobject import BaseObject +from models.baseobject import BaseObject class Stat: diff --git a/model/baseobject.py b/models/baseobject.py similarity index 99% rename from model/baseobject.py rename to models/baseobject.py index 68863c0..fad7ae4 100644 --- a/model/baseobject.py +++ b/models/baseobject.py @@ -2,7 +2,7 @@ import json from copy import deepcopy from typing import Dict, Union, Optional, List -from model.types import JSONDict +from models.types import JSONDict class BaseObject: diff --git a/model/gacha/banner.py b/models/gacha/banner.py similarity index 98% rename from model/gacha/banner.py rename to models/gacha/banner.py index 51e3f2f..159c65e 100644 --- a/model/gacha/banner.py +++ b/models/gacha/banner.py @@ -1,6 +1,6 @@ from enum import Enum -from model.gacha.common import ItemParamData +from models.gacha.common import ItemParamData class BannerType(Enum): diff --git a/model/gacha/common.py b/models/gacha/common.py similarity index 100% rename from model/gacha/common.py rename to models/gacha/common.py diff --git a/model/gacha/manager.py b/models/gacha/manager.py similarity index 100% rename from model/gacha/manager.py rename to models/gacha/manager.py diff --git a/model/game/artifact.py b/models/game/artifact.py similarity index 93% rename from model/game/artifact.py rename to models/game/artifact.py index 2cc617f..3ebeacd 100644 --- a/model/game/artifact.py +++ b/models/game/artifact.py @@ -1,9 +1,9 @@ from enum import Enum from typing import Union, Optional, List -from model.base import GameItem -from model.baseobject import BaseObject -from model.types import JSONDict +from models.base import GameItem +from models.baseobject import BaseObject +from models.types import JSONDict class ArtifactInfo(BaseObject): diff --git a/model/game/character.py b/models/game/character.py similarity index 93% rename from model/game/character.py rename to models/game/character.py index 3d7968d..6d9ad68 100644 --- a/model/game/character.py +++ b/models/game/character.py @@ -1,12 +1,12 @@ from typing import Optional, List -from model.baseobject import BaseObject -from model.game.artifact import ArtifactInfo -from model.game.fetter import FetterInfo -from model.game.skill import Skill -from model.game.talent import Talent -from model.game.weapon import WeaponInfo -from model.types import JSONDict +from models.baseobject import BaseObject +from models.game.artifact import ArtifactInfo +from models.game.fetter import FetterInfo +from models.game.skill import Skill +from models.game.talent import Talent +from models.game.weapon import WeaponInfo +from models.types import JSONDict class CharacterValueInfo(BaseObject): diff --git a/model/game/fetter.py b/models/game/fetter.py similarity index 84% rename from model/game/fetter.py rename to models/game/fetter.py index 39dcce1..0b6c991 100644 --- a/model/game/fetter.py +++ b/models/game/fetter.py @@ -1,4 +1,4 @@ -from model.baseobject import BaseObject +from models.baseobject import BaseObject class FetterInfo(BaseObject): diff --git a/model/game/skill.py b/models/game/skill.py similarity index 92% rename from model/game/skill.py rename to models/game/skill.py index cf772ae..28674d3 100644 --- a/model/game/skill.py +++ b/models/game/skill.py @@ -1,4 +1,4 @@ -from model.baseobject import BaseObject +from models.baseobject import BaseObject class Skill(BaseObject): diff --git a/model/game/talent.py b/models/game/talent.py similarity index 90% rename from model/game/talent.py rename to models/game/talent.py index 23d45a7..c6b56be 100644 --- a/model/game/talent.py +++ b/models/game/talent.py @@ -1,4 +1,4 @@ -from model.baseobject import BaseObject +from models.baseobject import BaseObject class Talent(BaseObject): diff --git a/model/game/weapon.py b/models/game/weapon.py similarity index 93% rename from model/game/weapon.py rename to models/game/weapon.py index 4bc4ad9..e330622 100644 --- a/model/game/weapon.py +++ b/models/game/weapon.py @@ -1,8 +1,8 @@ from enum import Enum from typing import Union, Optional -from model.base import GameItem -from model.baseobject import BaseObject +from models.base import GameItem +from models.baseobject import BaseObject class WeaponInfo(BaseObject): diff --git a/model/types.py b/models/types.py similarity index 100% rename from model/types.py rename to models/types.py diff --git a/model/wiki/characters.py b/models/wiki/characters.py similarity index 100% rename from model/wiki/characters.py rename to models/wiki/characters.py diff --git a/model/wiki/helpers.py b/models/wiki/helpers.py similarity index 100% rename from model/wiki/helpers.py rename to models/wiki/helpers.py diff --git a/model/wiki/metadata/ascension.json b/models/wiki/metadata/ascension.json similarity index 100% rename from model/wiki/metadata/ascension.json rename to models/wiki/metadata/ascension.json diff --git a/model/wiki/metadata/elite.json b/models/wiki/metadata/elite.json similarity index 100% rename from model/wiki/metadata/elite.json rename to models/wiki/metadata/elite.json diff --git a/model/wiki/metadata/monster.json b/models/wiki/metadata/monster.json similarity index 100% rename from model/wiki/metadata/monster.json rename to models/wiki/metadata/monster.json diff --git a/model/wiki/weapons.py b/models/wiki/weapons.py similarity index 100% rename from model/wiki/weapons.py rename to models/wiki/weapons.py diff --git a/plugins/artifact_rate.py b/plugins/artifact_rate.py index dc47721..3338907 100644 --- a/plugins/artifact_rate.py +++ b/plugins/artifact_rate.py @@ -7,7 +7,7 @@ from telegram.ext import CallbackContext, ConversationHandler, CommandHandler, C from telegram.helpers import escape_markdown from logger import Log -from model.apihelper.artifact import ArtifactOcrRate, get_comment, get_format_sub_item +from models.apihelper.artifact import ArtifactOcrRate, get_comment, get_format_sub_item from plugins.base import BasePlugins from utils.decorators.error import error_callable from utils.decorators.restricts import restricts diff --git a/plugins/gacha/gacha.py b/plugins/gacha/gacha.py index ceb309e..5bf1d70 100644 --- a/plugins/gacha/gacha.py +++ b/plugins/gacha/gacha.py @@ -7,7 +7,7 @@ from telegram.ext import filters, CommandHandler, MessageHandler, CallbackContex from apps.template import TemplateService from logger import Log -from model.apihelper.gacha import GachaInfo +from models.apihelper.gacha import GachaInfo from plugins.base import BasePlugins from plugins.gacha.wish import WishCountInfo, get_one from utils.apps.inject import inject diff --git a/test/model/apihelper/test_artifact.py b/test/model/apihelper/test_artifact.py index e4d9dc9..d749abb 100644 --- a/test/model/apihelper/test_artifact.py +++ b/test/model/apihelper/test_artifact.py @@ -1,7 +1,7 @@ import unittest from unittest import IsolatedAsyncioTestCase -from model.apihelper.artifact import ArtifactOcrRate +from models.apihelper.artifact import ArtifactOcrRate class TestArtifact(IsolatedAsyncioTestCase): diff --git a/test/model/test_base.py b/test/model/test_base.py index de607b8..6cfe798 100644 --- a/test/model/test_base.py +++ b/test/model/test_base.py @@ -1,8 +1,8 @@ import json import unittest -from model.base import GameItem -from model.game.artifact import ArtifactInfo +from models.base import GameItem +from models.game.artifact import ArtifactInfo class TestBase(unittest.TestCase): diff --git a/test/model/wiki/test_wiki.py b/test/model/wiki/test_wiki.py index ffacacc..6535f07 100644 --- a/test/model/wiki/test_wiki.py +++ b/test/model/wiki/test_wiki.py @@ -1,8 +1,8 @@ import unittest from unittest import IsolatedAsyncioTestCase -from model.wiki.characters import Characters -from model.wiki.weapons import Weapons +from models.wiki.characters import Characters +from models.wiki.weapons import Weapons weapons = Weapons() diff --git a/test/service/test_game.py b/test/service/test_game.py index 64b755b..8087773 100644 --- a/test/service/test_game.py +++ b/test/service/test_game.py @@ -1,7 +1,7 @@ import unittest from unittest import IsolatedAsyncioTestCase -from model.apihelper.hyperion import Hyperion +from models.apihelper.hyperion import Hyperion class TestGame(IsolatedAsyncioTestCase): diff --git a/utils/apps/inject.py b/utils/apps/inject.py index e471369..a2f323d 100644 --- a/utils/apps/inject.py +++ b/utils/apps/inject.py @@ -4,7 +4,7 @@ from functools import wraps from utils.app.manager import ServiceDict from logger import Log -from model.types import Func +from models.types import Func def get_injections(func: Func): diff --git a/utils/apps/manager.py b/utils/apps/manager.py index df8e282..2561e71 100644 --- a/utils/apps/manager.py +++ b/utils/apps/manager.py @@ -5,7 +5,7 @@ from importlib import import_module from typing import List, Union, Dict from logger import Log -from model.types import Func +from models.types import Func from utils.aiobrowser import AioBrowser from utils.mysql import MySQL from utils.redisdb import RedisDB diff --git a/utils/helpers.py b/utils/helpers.py index 43781bb..8174d7c 100644 --- a/utils/helpers.py +++ b/utils/helpers.py @@ -11,7 +11,7 @@ from httpx import UnsupportedProtocol from apps.cookies.services import CookiesService from apps.user.services import UserService from logger import Log -from model.base import RegionEnum +from models.base import RegionEnum USER_AGENT: str = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) " \ "Chrome/90.0.4430.72 Safari/537.36"