mirror of
https://github.com/baiqwerdvd/ArknightsUID.git
synced 2025-05-04 19:17:33 +08:00
format
This commit is contained in:
parent
b233279d14
commit
a66b099e1b
@ -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
|
||||
|
@ -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:
|
||||
|
@ -1,4 +1,5 @@
|
||||
from typing import Dict
|
||||
|
||||
from gsuid_core.utils.plugins_config.models import (
|
||||
GSC,
|
||||
GsBoolConfig,
|
||||
|
@ -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
|
||||
|
||||
|
@ -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")
|
||||
|
@ -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):
|
||||
|
@ -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:
|
||||
|
@ -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
|
||||
|
@ -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")
|
||||
|
@ -1,6 +1,5 @@
|
||||
from typing import Union
|
||||
|
||||
|
||||
UID_HINT = "添加失败, 请先绑定明日方舟UID"
|
||||
|
||||
|
||||
|
@ -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")
|
||||
|
@ -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
|
||||
|
@ -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")
|
||||
|
@ -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")
|
||||
|
@ -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")
|
||||
|
@ -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]
|
||||
|
@ -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
|
||||
|
@ -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]
|
||||
|
@ -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]
|
||||
|
@ -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")
|
||||
|
@ -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")
|
||||
|
@ -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")
|
||||
|
@ -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")
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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")
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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")
|
||||
|
@ -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")
|
||||
|
@ -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
|
||||
|
@ -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")
|
||||
|
@ -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")
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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]
|
||||
|
@ -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
|
||||
|
@ -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")
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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")
|
||||
|
@ -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")
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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")
|
||||
|
@ -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")
|
||||
|
@ -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
|
||||
|
@ -1,4 +1,5 @@
|
||||
from typing import Dict, List, Union
|
||||
|
||||
from msgspec import Struct, field
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user