♻ 规范命名 优化导入

`model` → `models`
This commit is contained in:
洛水居室 2022-08-05 19:20:47 +08:00
parent 9ac387ded2
commit 9327e69f9d
No known key found for this signature in database
GPG Key ID: C9DE87DA724B88FC
44 changed files with 44 additions and 44 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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):

View File

@ -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

View File

@ -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

View File

@ -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:

View File

@ -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:

View File

@ -1,6 +1,6 @@
from enum import Enum
from model.gacha.common import ItemParamData
from models.gacha.common import ItemParamData
class BannerType(Enum):

View File

@ -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):

View File

@ -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):

View File

@ -1,4 +1,4 @@
from model.baseobject import BaseObject
from models.baseobject import BaseObject
class FetterInfo(BaseObject):

View File

@ -1,4 +1,4 @@
from model.baseobject import BaseObject
from models.baseobject import BaseObject
class Skill(BaseObject):

View File

@ -1,4 +1,4 @@
from model.baseobject import BaseObject
from models.baseobject import BaseObject
class Talent(BaseObject):

View File

@ -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):

View File

@ -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

View File

@ -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

View File

@ -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):

View File

@ -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):

View File

@ -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()

View File

@ -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):

View File

@ -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):

View File

@ -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

View File

@ -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"