diff --git a/ArknightsUID/arknightsuid_charsnapshot/__init__.py b/ArknightsUID/arknightsuid_charsnapshot/__init__.py index b7bfcd5..6708a9d 100644 --- a/ArknightsUID/arknightsuid_charsnapshot/__init__.py +++ b/ArknightsUID/arknightsuid_charsnapshot/__init__.py @@ -1,7 +1,6 @@ from gsuid_core.bot import Bot from gsuid_core.models import Event from gsuid_core.sv import SV -from gsuid_core.utils.database.api import get_uid from ..utils.ark_prefix import PREFIX from ..utils.database.models import ArknightsBind diff --git a/ArknightsUID/arknightsuid_charsnapshot/get_char_snapshot.py b/ArknightsUID/arknightsuid_charsnapshot/get_char_snapshot.py index 548fd0b..d04cf42 100644 --- a/ArknightsUID/arknightsuid_charsnapshot/get_char_snapshot.py +++ b/ArknightsUID/arknightsuid_charsnapshot/get_char_snapshot.py @@ -1,20 +1,21 @@ -from typing import Dict -from PIL import Image, ImageDraw from pathlib import Path -from ..utils.models.skland.models import ( - PlayerCharInfo, - PlayerEquipmentInfo, - PlayerInfoChar, -) +from typing import Dict + from gsuid_core.utils.image.convert import convert_img +from PIL import Image, ImageDraw + from ..arknightsuid_resource.constants import SKILL_TABLE +from ..utils.ark_api import ark_skd_api from ..utils.fonts.source_han_sans import ( sans_font_26, sans_font_28, sans_font_34, ) -from ..utils.ark_api import ark_skd_api - +from ..utils.models.skland.models import ( + PlayerCharInfo, + PlayerEquipmentInfo, + PlayerInfoChar, +) char_sort_list = [ "伊内丝", @@ -26,12 +27,12 @@ char_sort_list = [ "史尔特尔", "黍", "锏", - "焰影苇草", + "玛恩纳", "缄默德克萨斯", "艾拉", "麒麟R夜刀", "铃兰", - "玛恩纳", + "焰影苇草", "温蒂", "莱伊", "假日威龙陈", @@ -142,7 +143,7 @@ async def get_char_snapshot(uid: str, cur_page: int): outher_chars = [char for char in chars if charInfoMap[char.charId].rarity != 5] six_star_count = len(six_star_chars) - other_char_count = len(outher_chars) + # other_char_count = len(outher_chars) # 6星角色按照list的顺序排序 for char in chars: diff --git a/ArknightsUID/arknightsuid_config/config_default.py b/ArknightsUID/arknightsuid_config/config_default.py index 99787c5..ba79929 100644 --- a/ArknightsUID/arknightsuid_config/config_default.py +++ b/ArknightsUID/arknightsuid_config/config_default.py @@ -1,4 +1,5 @@ from typing import Dict + from gsuid_core.utils.plugins_config.models import ( GSC, GsBoolConfig, diff --git a/ArknightsUID/arknightsuid_login/__init__.py b/ArknightsUID/arknightsuid_login/__init__.py index 3657326..3a793c5 100644 --- a/ArknightsUID/arknightsuid_login/__init__.py +++ b/ArknightsUID/arknightsuid_login/__init__.py @@ -1,15 +1,15 @@ from gsuid_core.bot import Bot -from gsuid_core.sv import SV -from gsuid_core.models import Event from gsuid_core.logger import logger +from gsuid_core.models import Event +from gsuid_core.sv import SV +from ..utils.ark_api import ark_skd_api +from ..utils.ark_prefix import PREFIX from ..utils.database.models import ( ArknightsBind, ArknightsPush, ArknightsUser, ) -from ..utils.ark_api import ark_skd_api -from ..utils.ark_prefix import PREFIX from ..utils.error_reply import UID_HINT from .login import SklandLogin diff --git a/ArknightsUID/arknightsuid_login/login.py b/ArknightsUID/arknightsuid_login/login.py index cadaff0..dcf80da 100644 --- a/ArknightsUID/arknightsuid_login/login.py +++ b/ArknightsUID/arknightsuid_login/login.py @@ -1,12 +1,19 @@ import re -from typing import ClassVar, Dict, TypeVar, Union -import httpx from datetime import datetime +from typing import ClassVar, Dict, TypeVar, Union +import httpx +from gsuid_core.utils.plugins_config.gs_config import core_plugins_config from msgspec import UnsetType, convert from msgspec import json as mscjson -from gsuid_core.utils.plugins_config.gs_config import core_plugins_config +from .constant import ( + ARK_ACCONUT_INFO_HG, + ARK_LOGIN_SEND_PHONE_CODE, + ARK_TOKEN_BY_PHONE_CODE, + ARK_USER_OAUTH2_V2_GRANT, + GENERATE_CRED_BY_CODE, +) from .model import ( AccountInfoHGRequest, AccountInfoHGResponse, @@ -21,13 +28,6 @@ from .model import ( ZonaiSklandWebUserGenerateCredByCodeRequest, ZonaiSklandWebUserGenerateCredByCodeResponse, ) -from .constant import ( - ARK_LOGIN_SEND_PHONE_CODE, - ARK_TOKEN_BY_PHONE_CODE, - ARK_ACCONUT_INFO_HG, - ARK_USER_OAUTH2_V2_GRANT, - GENERATE_CRED_BY_CODE, -) T1 = TypeVar("T1") T2 = TypeVar("T2") diff --git a/ArknightsUID/arknightsuid_login/model.py b/ArknightsUID/arknightsuid_login/model.py index c7150c3..2c977c7 100644 --- a/ArknightsUID/arknightsuid_login/model.py +++ b/ArknightsUID/arknightsuid_login/model.py @@ -1,5 +1,6 @@ from typing import Dict, Union -from msgspec import Struct, field, UnsetType, UNSET + +from msgspec import UNSET, Struct, UnsetType, field class GeneralGeetestData(Struct): diff --git a/ArknightsUID/arknightsuid_resource/constants.py b/ArknightsUID/arknightsuid_resource/constants.py index 0e52b6a..0cc99ea 100644 --- a/ArknightsUID/arknightsuid_resource/constants.py +++ b/ArknightsUID/arknightsuid_resource/constants.py @@ -1,10 +1,10 @@ import asyncio -from pathlib import Path import json import threading +from pathlib import Path + +from gsuid_core.logger import logger -from ..utils.resource.download_all_resource import download_all_resource -from ..utils.resource.RESOURCE_PATH import GAMEDATA_PATH from ..utils.models.gamedata.BattleEquipTable import BattleEquipTable from ..utils.models.gamedata.BuildingData import BuildingData from ..utils.models.gamedata.CampaignTable import CampaignTable @@ -49,8 +49,8 @@ from ..utils.models.gamedata.TokenTable import TokenTable from ..utils.models.gamedata.UniequipData import UniequipData from ..utils.models.gamedata.UniequipTable import UniEquipTable from ..utils.models.gamedata.ZoneTable import ZoneTable - -from gsuid_core.logger import logger +from ..utils.resource.download_all_resource import download_all_resource +from ..utils.resource.RESOURCE_PATH import GAMEDATA_PATH def read_json(file_path: Path, **kwargs) -> dict: diff --git a/ArknightsUID/arknightsuid_user/__init__.py b/ArknightsUID/arknightsuid_user/__init__.py index ef9e21d..e54b773 100644 --- a/ArknightsUID/arknightsuid_user/__init__.py +++ b/ArknightsUID/arknightsuid_user/__init__.py @@ -1,4 +1,5 @@ from typing import List + from gsuid_core.bot import Bot from gsuid_core.models import Event from gsuid_core.sv import SV diff --git a/ArknightsUID/arknightsuid_wiki/__init__.py b/ArknightsUID/arknightsuid_wiki/__init__.py index 925b66b..d5c2ff8 100644 --- a/ArknightsUID/arknightsuid_wiki/__init__.py +++ b/ArknightsUID/arknightsuid_wiki/__init__.py @@ -1,19 +1,19 @@ import re from gsuid_core.bot import Bot +from gsuid_core.logger import logger from gsuid_core.models import Event from gsuid_core.sv import SV -from gsuid_core.logger import logger from gsuid_core.utils.image.convert import convert_img from gsuid_core.utils.image.image_tools import draw_center_text_by_line from PIL import Image, ImageDraw +from ..arknightsuid_resource.constants import CHARACTER_TABLE from ..arknightsuid_wiki.draw_wiki_img import ( # draw_wiki, get_equip_info, get_wiki_info, ) -from ..arknightsuid_resource.constants import CHARACTER_TABLE from ..utils.fonts.source_han_sans import sans_font_20 sv_sr_wiki = SV("arkWIKI") diff --git a/ArknightsUID/utils/error_reply.py b/ArknightsUID/utils/error_reply.py index 78ff6ef..99dfbcf 100644 --- a/ArknightsUID/utils/error_reply.py +++ b/ArknightsUID/utils/error_reply.py @@ -1,6 +1,5 @@ from typing import Union - UID_HINT = "添加失败, 请先绑定明日方舟UID" diff --git a/ArknightsUID/utils/models/gamedata/ActivityTable.py b/ArknightsUID/utils/models/gamedata/ActivityTable.py index f88f3db..ff95d0d 100644 --- a/ArknightsUID/utils/models/gamedata/ActivityTable.py +++ b/ArknightsUID/utils/models/gamedata/ActivityTable.py @@ -1,10 +1,10 @@ from enum import Enum from typing import Any, Dict, List, Union -from ..common import BaseStruct - from msgspec import field +from ..common import BaseStruct + class ActivityTableBasicData(BaseStruct): id_: str = field(name="id") diff --git a/ArknightsUID/utils/models/gamedata/AudioData.py b/ArknightsUID/utils/models/gamedata/AudioData.py index 01f4643..11f7e83 100644 --- a/ArknightsUID/utils/models/gamedata/AudioData.py +++ b/ArknightsUID/utils/models/gamedata/AudioData.py @@ -1,9 +1,9 @@ from typing import Dict, List, Union -from ..common import BaseStruct - from msgspec import field +from ..common import BaseStruct + class BGMBank(BaseStruct): name: str diff --git a/ArknightsUID/utils/models/gamedata/BuildingData.py b/ArknightsUID/utils/models/gamedata/BuildingData.py index 049049d..def60e2 100644 --- a/ArknightsUID/utils/models/gamedata/BuildingData.py +++ b/ArknightsUID/utils/models/gamedata/BuildingData.py @@ -1,9 +1,9 @@ from typing import Dict, List, Union -from ..common import BaseStruct - from msgspec import field +from ..common import BaseStruct + class BuildingDataRoomUnlockCondCondItem(BaseStruct): type_: str = field(name="type") diff --git a/ArknightsUID/utils/models/gamedata/CampaignTable.py b/ArknightsUID/utils/models/gamedata/CampaignTable.py index b8452dc..f7b8da2 100644 --- a/ArknightsUID/utils/models/gamedata/CampaignTable.py +++ b/ArknightsUID/utils/models/gamedata/CampaignTable.py @@ -1,9 +1,9 @@ from typing import Dict, List, Union -from ..common import BaseStruct - from msgspec import field +from ..common import BaseStruct + class ItemBundle(BaseStruct): id_: str = field(name="id") diff --git a/ArknightsUID/utils/models/gamedata/CharMetaTable.py b/ArknightsUID/utils/models/gamedata/CharMetaTable.py index 6e4a317..fe2dca2 100644 --- a/ArknightsUID/utils/models/gamedata/CharMetaTable.py +++ b/ArknightsUID/utils/models/gamedata/CharMetaTable.py @@ -1,9 +1,9 @@ from typing import Dict, List -from ..common import BaseStruct - from msgspec import field +from ..common import BaseStruct + class ItemBundle(BaseStruct): id_: str = field(name="id") diff --git a/ArknightsUID/utils/models/gamedata/CharPatchTable.py b/ArknightsUID/utils/models/gamedata/CharPatchTable.py index cd206d9..e23c1ab 100644 --- a/ArknightsUID/utils/models/gamedata/CharPatchTable.py +++ b/ArknightsUID/utils/models/gamedata/CharPatchTable.py @@ -1,9 +1,9 @@ from typing import Dict, List, Union -from ..common import BaseStruct - from msgspec import field +from ..common import BaseStruct + class CharPatchDataPatchInfo(BaseStruct): tmplIds: List[str] diff --git a/ArknightsUID/utils/models/gamedata/CharacterTable.py b/ArknightsUID/utils/models/gamedata/CharacterTable.py index b3b5ed1..0291188 100644 --- a/ArknightsUID/utils/models/gamedata/CharacterTable.py +++ b/ArknightsUID/utils/models/gamedata/CharacterTable.py @@ -1,9 +1,9 @@ from typing import Dict, List, Union -from ..common import BaseStruct - from msgspec import field +from ..common import BaseStruct + class CharacterDataUnlockCondition(BaseStruct): phase: int diff --git a/ArknightsUID/utils/models/gamedata/CharmTable.py b/ArknightsUID/utils/models/gamedata/CharmTable.py index 3545355..8f4fe6f 100644 --- a/ArknightsUID/utils/models/gamedata/CharmTable.py +++ b/ArknightsUID/utils/models/gamedata/CharmTable.py @@ -1,9 +1,9 @@ from typing import List, Union -from ..common import BaseStruct - from msgspec import field +from ..common import BaseStruct + class RuneDataSelector(BaseStruct): professionMask: Union[int, str] diff --git a/ArknightsUID/utils/models/gamedata/CharwordTable.py b/ArknightsUID/utils/models/gamedata/CharwordTable.py index 7a83363..fa5515b 100644 --- a/ArknightsUID/utils/models/gamedata/CharwordTable.py +++ b/ArknightsUID/utils/models/gamedata/CharwordTable.py @@ -1,9 +1,9 @@ from typing import Dict, List, Union -from ..common import BaseStruct - from msgspec import field +from ..common import BaseStruct + class CharWordUnlockParam(BaseStruct): valueStr: Union[str, None] diff --git a/ArknightsUID/utils/models/gamedata/CheckinTable.py b/ArknightsUID/utils/models/gamedata/CheckinTable.py index aa42293..571cad8 100644 --- a/ArknightsUID/utils/models/gamedata/CheckinTable.py +++ b/ArknightsUID/utils/models/gamedata/CheckinTable.py @@ -1,9 +1,9 @@ from typing import Dict, List -from ..common import BaseStruct - from msgspec import field +from ..common import BaseStruct + class ItemBundle(BaseStruct): id_: str = field(name="id") diff --git a/ArknightsUID/utils/models/gamedata/ClimbTowerTable.py b/ArknightsUID/utils/models/gamedata/ClimbTowerTable.py index ab0c3bb..acc4f4b 100644 --- a/ArknightsUID/utils/models/gamedata/ClimbTowerTable.py +++ b/ArknightsUID/utils/models/gamedata/ClimbTowerTable.py @@ -1,9 +1,9 @@ from typing import Dict, List, Union -from ..common import BaseStruct - from msgspec import field +from ..common import BaseStruct + class ItemBundle(BaseStruct): id_: str = field(name="id") diff --git a/ArknightsUID/utils/models/gamedata/CrisisTable.py b/ArknightsUID/utils/models/gamedata/CrisisTable.py index c26692e..c019967 100644 --- a/ArknightsUID/utils/models/gamedata/CrisisTable.py +++ b/ArknightsUID/utils/models/gamedata/CrisisTable.py @@ -1,9 +1,9 @@ from typing import Dict, List, Union -from ..common import BaseStruct - from msgspec import field +from ..common import BaseStruct + class ItemBundle(BaseStruct): id_: str = field(name="id") diff --git a/ArknightsUID/utils/models/gamedata/CrisisV2Table.py b/ArknightsUID/utils/models/gamedata/CrisisV2Table.py index 4d069d5..9f4c678 100644 --- a/ArknightsUID/utils/models/gamedata/CrisisV2Table.py +++ b/ArknightsUID/utils/models/gamedata/CrisisV2Table.py @@ -1,10 +1,10 @@ from enum import Enum from typing import Dict -from ..common import BaseStruct - from msgspec import field +from ..common import BaseStruct + class ItemBundle(BaseStruct): id_: str = field(name="id") diff --git a/ArknightsUID/utils/models/gamedata/DisplayMetaTable.py b/ArknightsUID/utils/models/gamedata/DisplayMetaTable.py index 4a66e07..4703606 100644 --- a/ArknightsUID/utils/models/gamedata/DisplayMetaTable.py +++ b/ArknightsUID/utils/models/gamedata/DisplayMetaTable.py @@ -1,9 +1,9 @@ from typing import Dict, List -from ..common import BaseStruct - from msgspec import field +from ..common import BaseStruct + class PlayerAvatarPerData(BaseStruct): avatarId: str diff --git a/ArknightsUID/utils/models/gamedata/EnemyHandbookTable.py b/ArknightsUID/utils/models/gamedata/EnemyHandbookTable.py index b8547f5..5ec4e2c 100644 --- a/ArknightsUID/utils/models/gamedata/EnemyHandbookTable.py +++ b/ArknightsUID/utils/models/gamedata/EnemyHandbookTable.py @@ -1,9 +1,9 @@ from typing import Dict, List, Union -from ..common import BaseStruct - from msgspec import field +from ..common import BaseStruct + class EnemyHandBookDataAbilty(BaseStruct): text: str diff --git a/ArknightsUID/utils/models/gamedata/GachaTable.py b/ArknightsUID/utils/models/gamedata/GachaTable.py index 774a0b3..9a1a652 100644 --- a/ArknightsUID/utils/models/gamedata/GachaTable.py +++ b/ArknightsUID/utils/models/gamedata/GachaTable.py @@ -1,9 +1,9 @@ from typing import Dict, List, Union -from ..common import BaseStruct - from msgspec import field +from ..common import BaseStruct + class GachaDataLinkageTenGachaTkt(BaseStruct): itemId: str diff --git a/ArknightsUID/utils/models/gamedata/GamedataConst.py b/ArknightsUID/utils/models/gamedata/GamedataConst.py index 3cdcd68..a548e91 100644 --- a/ArknightsUID/utils/models/gamedata/GamedataConst.py +++ b/ArknightsUID/utils/models/gamedata/GamedataConst.py @@ -1,9 +1,9 @@ from typing import Dict, List, Union -from ..common import BaseStruct - from msgspec import field +from ..common import BaseStruct + class ItemBundle(BaseStruct): id_: str = field(name="id") diff --git a/ArknightsUID/utils/models/gamedata/HandbookInfoTable.py b/ArknightsUID/utils/models/gamedata/HandbookInfoTable.py index c6ce545..082681c 100644 --- a/ArknightsUID/utils/models/gamedata/HandbookInfoTable.py +++ b/ArknightsUID/utils/models/gamedata/HandbookInfoTable.py @@ -1,9 +1,9 @@ from typing import Dict, List, Union -from ..common import BaseStruct - from msgspec import field +from ..common import BaseStruct + class HandbookUnlockParam(BaseStruct): unlockType: int diff --git a/ArknightsUID/utils/models/gamedata/ItemTable.py b/ArknightsUID/utils/models/gamedata/ItemTable.py index 8f68ddd..863b613 100644 --- a/ArknightsUID/utils/models/gamedata/ItemTable.py +++ b/ArknightsUID/utils/models/gamedata/ItemTable.py @@ -1,9 +1,9 @@ from typing import ClassVar, Dict, List, Union -from ..common import BaseStruct - from msgspec import field +from ..common import BaseStruct + class ItemDataStageDropInfo(BaseStruct): stageId: str diff --git a/ArknightsUID/utils/models/gamedata/MedalTable.py b/ArknightsUID/utils/models/gamedata/MedalTable.py index 70c28d2..2593991 100644 --- a/ArknightsUID/utils/models/gamedata/MedalTable.py +++ b/ArknightsUID/utils/models/gamedata/MedalTable.py @@ -1,9 +1,9 @@ from typing import Dict, List, Union -from ..common import BaseStruct - from msgspec import field +from ..common import BaseStruct + class MedalExpireTime(BaseStruct): start: int diff --git a/ArknightsUID/utils/models/gamedata/MissionTable.py b/ArknightsUID/utils/models/gamedata/MissionTable.py index 1255b2c..036dc65 100644 --- a/ArknightsUID/utils/models/gamedata/MissionTable.py +++ b/ArknightsUID/utils/models/gamedata/MissionTable.py @@ -1,9 +1,9 @@ from typing import Dict, List, Union -from ..common import BaseStruct - from msgspec import field +from ..common import BaseStruct + class MissionDisplayRewards(BaseStruct): type_: str = field(name="type") diff --git a/ArknightsUID/utils/models/gamedata/OpenServerTable.py b/ArknightsUID/utils/models/gamedata/OpenServerTable.py index 22445fb..3c808b6 100644 --- a/ArknightsUID/utils/models/gamedata/OpenServerTable.py +++ b/ArknightsUID/utils/models/gamedata/OpenServerTable.py @@ -1,9 +1,9 @@ from typing import Dict, List, Union -from ..common import BaseStruct - from msgspec import field +from ..common import BaseStruct + class RewardItem(BaseStruct): type_: str = field(name="type") diff --git a/ArknightsUID/utils/models/gamedata/RangeTable.py b/ArknightsUID/utils/models/gamedata/RangeTable.py index 10116f1..2d5ae08 100644 --- a/ArknightsUID/utils/models/gamedata/RangeTable.py +++ b/ArknightsUID/utils/models/gamedata/RangeTable.py @@ -1,9 +1,9 @@ from typing import Dict, List, Union -from ..common import BaseStruct - from msgspec import field +from ..common import BaseStruct + class GridPosition(BaseStruct): row: int diff --git a/ArknightsUID/utils/models/gamedata/ReplicateTable.py b/ArknightsUID/utils/models/gamedata/ReplicateTable.py index e233a35..fe92e2f 100644 --- a/ArknightsUID/utils/models/gamedata/ReplicateTable.py +++ b/ArknightsUID/utils/models/gamedata/ReplicateTable.py @@ -1,9 +1,9 @@ from typing import Dict, List -from ..common import BaseStruct - from msgspec import field +from ..common import BaseStruct + class ItemBundle(BaseStruct): id_: str = field(name="id") diff --git a/ArknightsUID/utils/models/gamedata/RetroTable.py b/ArknightsUID/utils/models/gamedata/RetroTable.py index 21ca5b8..7184fe1 100644 --- a/ArknightsUID/utils/models/gamedata/RetroTable.py +++ b/ArknightsUID/utils/models/gamedata/RetroTable.py @@ -1,9 +1,9 @@ from typing import Dict, List, Union -from ..common import BaseStruct - from msgspec import field +from ..common import BaseStruct + class ItemBundle(BaseStruct): id_: str = field(name="id") diff --git a/ArknightsUID/utils/models/gamedata/RoguelikeTable.py b/ArknightsUID/utils/models/gamedata/RoguelikeTable.py index a127e8b..1612a4e 100644 --- a/ArknightsUID/utils/models/gamedata/RoguelikeTable.py +++ b/ArknightsUID/utils/models/gamedata/RoguelikeTable.py @@ -1,9 +1,9 @@ from typing import Dict, List, Union -from ..common import BaseStruct - from msgspec import field +from ..common import BaseStruct + class Blackboard(BaseStruct): key: str diff --git a/ArknightsUID/utils/models/gamedata/RoguelikeTopicTable.py b/ArknightsUID/utils/models/gamedata/RoguelikeTopicTable.py index cd93416..c9ef1c7 100644 --- a/ArknightsUID/utils/models/gamedata/RoguelikeTopicTable.py +++ b/ArknightsUID/utils/models/gamedata/RoguelikeTopicTable.py @@ -1,9 +1,9 @@ from typing import Dict, List, Union -from ..common import BaseStruct - from msgspec import field +from ..common import BaseStruct + class RoguelikeTopicBasicDataHomeEntryDisplayData(BaseStruct): topicId: str diff --git a/ArknightsUID/utils/models/gamedata/SandboxTable.py b/ArknightsUID/utils/models/gamedata/SandboxTable.py index 8f5256c..c2ce4a7 100644 --- a/ArknightsUID/utils/models/gamedata/SandboxTable.py +++ b/ArknightsUID/utils/models/gamedata/SandboxTable.py @@ -1,9 +1,9 @@ from typing import Dict, List, Union -from ..common import BaseStruct - from msgspec import field +from ..common import BaseStruct + class SandboxMapConstTable(BaseStruct): directionNames: List[str] diff --git a/ArknightsUID/utils/models/gamedata/ShopClientTable.py b/ArknightsUID/utils/models/gamedata/ShopClientTable.py index 607cb8e..060b00b 100644 --- a/ArknightsUID/utils/models/gamedata/ShopClientTable.py +++ b/ArknightsUID/utils/models/gamedata/ShopClientTable.py @@ -1,9 +1,9 @@ from typing import Dict, List, Union -from ..common import BaseStruct - from msgspec import field +from ..common import BaseStruct + class ShopRecommendData(BaseStruct): imgId: str diff --git a/ArknightsUID/utils/models/gamedata/SkillTable.py b/ArknightsUID/utils/models/gamedata/SkillTable.py index 1ae33d0..cfd5f46 100644 --- a/ArknightsUID/utils/models/gamedata/SkillTable.py +++ b/ArknightsUID/utils/models/gamedata/SkillTable.py @@ -1,9 +1,9 @@ from typing import Dict, List, Union -from ..common import BaseStruct - from msgspec import field +from ..common import BaseStruct + class ItemBundle(BaseStruct): id_: str = field(name="id") diff --git a/ArknightsUID/utils/models/gamedata/StageTable.py b/ArknightsUID/utils/models/gamedata/StageTable.py index fac1d5e..30ef896 100644 --- a/ArknightsUID/utils/models/gamedata/StageTable.py +++ b/ArknightsUID/utils/models/gamedata/StageTable.py @@ -1,9 +1,9 @@ from typing import Dict, List, Union -from ..common import BaseStruct - from msgspec import field +from ..common import BaseStruct + class StageDataConditionDesc(BaseStruct): stageId: str diff --git a/ArknightsUID/utils/models/gamedata/StoryReviewMetaTable.py b/ArknightsUID/utils/models/gamedata/StoryReviewMetaTable.py index 2269d79..13957f7 100644 --- a/ArknightsUID/utils/models/gamedata/StoryReviewMetaTable.py +++ b/ArknightsUID/utils/models/gamedata/StoryReviewMetaTable.py @@ -1,9 +1,9 @@ from typing import Dict, List, Union -from ..common import BaseStruct - from msgspec import field +from ..common import BaseStruct + class MiniActTrialDataRuleData(BaseStruct): ruleType: str diff --git a/ArknightsUID/utils/models/gamedata/StoryReviewTable.py b/ArknightsUID/utils/models/gamedata/StoryReviewTable.py index 16ec634..247a7f1 100644 --- a/ArknightsUID/utils/models/gamedata/StoryReviewTable.py +++ b/ArknightsUID/utils/models/gamedata/StoryReviewTable.py @@ -1,9 +1,9 @@ from typing import Dict, List, Union -from ..common import BaseStruct - from msgspec import field +from ..common import BaseStruct + class ItemBundle(BaseStruct): id_: str = field(name="id") diff --git a/ArknightsUID/utils/models/gamedata/StoryTable.py b/ArknightsUID/utils/models/gamedata/StoryTable.py index 0ff339d..84f95a4 100644 --- a/ArknightsUID/utils/models/gamedata/StoryTable.py +++ b/ArknightsUID/utils/models/gamedata/StoryTable.py @@ -1,9 +1,9 @@ from typing import Dict, List, Union -from ..common import BaseStruct - from msgspec import field +from ..common import BaseStruct + class StoryDataTrigger(BaseStruct): type_: str = field(name="type") diff --git a/ArknightsUID/utils/models/gamedata/TechBuffTable.py b/ArknightsUID/utils/models/gamedata/TechBuffTable.py index 120a968..a92fa3a 100644 --- a/ArknightsUID/utils/models/gamedata/TechBuffTable.py +++ b/ArknightsUID/utils/models/gamedata/TechBuffTable.py @@ -1,9 +1,9 @@ from typing import List, Union -from ..common import BaseStruct - from msgspec import field +from ..common import BaseStruct + class RuneDataSelector(BaseStruct): professionMask: int diff --git a/ArknightsUID/utils/models/gamedata/TokenTable.py b/ArknightsUID/utils/models/gamedata/TokenTable.py index dcb9b7e..129a2ac 100644 --- a/ArknightsUID/utils/models/gamedata/TokenTable.py +++ b/ArknightsUID/utils/models/gamedata/TokenTable.py @@ -1,9 +1,9 @@ from typing import Dict, List, Union -from ..common import BaseStruct - from msgspec import field +from ..common import BaseStruct + class CharacterDataUnlockCondition(BaseStruct): phase: int diff --git a/ArknightsUID/utils/models/gamedata/UniequipData.py b/ArknightsUID/utils/models/gamedata/UniequipData.py index 1b6b5b5..a21b476 100644 --- a/ArknightsUID/utils/models/gamedata/UniequipData.py +++ b/ArknightsUID/utils/models/gamedata/UniequipData.py @@ -1,9 +1,9 @@ from typing import Dict, List, Union -from ..common import BaseStruct - from msgspec import field +from ..common import BaseStruct + class ItemBundle(BaseStruct): id_: str = field(name="id") diff --git a/ArknightsUID/utils/models/gamedata/UniequipTable.py b/ArknightsUID/utils/models/gamedata/UniequipTable.py index 404a68f..e39c497 100644 --- a/ArknightsUID/utils/models/gamedata/UniequipTable.py +++ b/ArknightsUID/utils/models/gamedata/UniequipTable.py @@ -1,9 +1,9 @@ from typing import Dict, List, Union -from ..common import BaseStruct - from msgspec import field +from ..common import BaseStruct + class ItemBundle(BaseStruct): id_: str = field(name="id") diff --git a/ArknightsUID/utils/models/gamedata/ZoneTable.py b/ArknightsUID/utils/models/gamedata/ZoneTable.py index 36af17c..e8568d0 100644 --- a/ArknightsUID/utils/models/gamedata/ZoneTable.py +++ b/ArknightsUID/utils/models/gamedata/ZoneTable.py @@ -1,9 +1,9 @@ from typing import Dict, List, Union -from ..common import BaseStruct - from msgspec import field +from ..common import BaseStruct + class ZoneData(BaseStruct): zoneID: str diff --git a/ArknightsUID/utils/models/skland/models.py b/ArknightsUID/utils/models/skland/models.py index f956e34..1c3d89e 100644 --- a/ArknightsUID/utils/models/skland/models.py +++ b/ArknightsUID/utils/models/skland/models.py @@ -1,4 +1,5 @@ from typing import Dict, List, Union + from msgspec import Struct, field diff --git a/pyproject.toml b/pyproject.toml index a7ee76b..9466763 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,10 +42,11 @@ extend-exclude = ''' [tool.isort] profile = "black" -line_length = 108 +line_length = 88 length_sort = true skip_gitignore = true force_sort_within_sections = true +src_paths = ["ArknightsUID", "tests"] extra_standard_library = ["typing_extensions"] [tool.pytest.ini_options] @@ -61,6 +62,7 @@ target-version = "py38" [tool.ruff.lint] select = [ + "I", # isort "F", # Pyflakes "W", # pycodestyle warnings "E", # pycodestyle errors