bump to 1.0.4

This commit is contained in:
qwerdvd 2023-11-09 10:06:46 +08:00
parent 142a968bcb
commit e52facaee1
No known key found for this signature in database
GPG Key ID: A3AF89C783404769
3 changed files with 7 additions and 7 deletions

View File

@ -1,6 +1,6 @@
[project]
name = "starrail_damage_cal"
version = "1.0.3"
version = "1.0.4"
description = "For StarRail Role Damage Cal"
authors = [
{name = "qwerdvd", email = "105906879+qwerdvd@users.noreply.github.com"},

View File

@ -55,7 +55,7 @@ class DamageCal:
raise MihomoRequestError
if char_id not in char_id_list:
raise NotInCharacterShowcaseError
raise NotInCharacterShowcaseError(char_id_list)
char_data = char_data_dict[char_id]
return await cls.cal_info(char_data)
@ -78,7 +78,7 @@ class DamageCal:
raise MihomoRequestError
if char_id not in char_id_list:
raise NotInCharacterShowcaseError
raise NotInCharacterShowcaseError(char_id_list)
char_data = char_data_dict[char_id]
return await cls.cal_info(char_data)
@ -104,7 +104,7 @@ class DamageCal:
@classmethod
async def get_all_damage_data_by_uid(cls, uid: str):
char_id_list, char_data_dict = await api_to_dict(uid=uid)
char_id_list, char_data_dict = await api_to_dict(uid)
if isinstance(char_id_list, str):
raise MihomoRequestError

View File

@ -1,12 +1,12 @@
import json
from typing import List
from typing import List, Union
from starrail_damage_cal.cal_damage import DamageCal
async def test_get_damage_data_by_uid() -> None:
data = await DamageCal.get_damage_data_by_uid(uid="100086290", avatar_name="希儿")
if isinstance(data, List):
data = await DamageCal.get_all_damage_data_by_uid(uid="102840119")
if isinstance(data, Union[List, dict]):
print(json.dumps(data, ensure_ascii=False, indent=4))