Skip to content

Commit

Permalink
Version update hotfix
Browse files Browse the repository at this point in the history
Co-authored-by: KT-Yeh <[email protected]>
  • Loading branch information
thesadru and KT-Yeh committed Aug 27, 2022
1 parent fe8137d commit 082bfc0
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions genshin/models/genshin/chronicle/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class Stats(APIModel):
spiral_abyss: str = Aliased("spiral_abyss", mi18n="bbs/unlock_portal")
anemoculi: int = Aliased("anemoculus_number", mi18n="bbs/wind_god")
geoculi: int = Aliased("geoculus_number", mi18n="bbs/rock_god")
dendroculi: int = Aliased("dendroculus_number", mi18n="bbs/dendro_culus")
electroculi: int = Aliased("electroculus_number", mi18n="bbs/electroculus_god")
common_chests: int = Aliased("common_chest_number", mi18n="bbs/general_treasure_box_count")
exquisite_chests: int = Aliased("exquisite_chest_number", mi18n="bbs/delicacy_treasure_box_count")
Expand Down
3 changes: 3 additions & 0 deletions genshin/models/genshin/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ class DBChar(typing.NamedTuple):
10000064: ("Yunjin", "Yun Jin", "Geo", 4),
10000065: ("Shinobu", "Kuki Shinobu", "Electro", 4),
10000066: ("Ayato", "Kamisato Ayato", "Hydro", 5),
10000067: ("Collei", "Dendro", 4),
10000068: ("Dori", "Electro", 4),
10000069: ("Tighnari", "Dendro", 5),
}
CHARACTER_NAMES: typing.Dict[int, DBChar] = {
id: (DBChar(id, *data) if len(data) == 4 else DBChar(id, data[0], *data))
Expand Down
4 changes: 2 additions & 2 deletions genshin/models/genshin/wiki.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def __flatten_display_field(cls, values: typing.Dict[str, typing.Any]) -> typing
class CharacterPreview(BaseWikiPreview):
"""Character wiki preview."""

bonus_attribute: str = Aliased("property")
bonus_attribute: str = Aliased("", "property")
rarity: int
region: str = ""
element: str = Aliased("vision", "")
Expand Down Expand Up @@ -158,7 +158,7 @@ def __format_modules(
modules: typing.Dict[str, typing.Dict[str, typing.Any]] = {}
for module in value:
components: typing.Dict[str, typing.Dict[str, typing.Any]] = {
component["component_id"]: json.loads(component["data"]) for component in module["components"]
component["component_id"]: json.loads(component["data"] or "{}") for component in module["components"]
}

components.pop("map", None) # not worth storing
Expand Down
4 changes: 2 additions & 2 deletions tests/client/components/test_calculator.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ async def test_calculator_artifacts(client: genshin.Client):
assert len(artifacts) >= 69

artifact = min(artifacts, key=lambda artifact: artifact.id)
assert artifact.name == "Heart of Comradeship"
assert artifact.max_level == 12
assert artifact.name == "Labyrinth Wayfarer"
assert artifact.max_level == 16
assert artifact.level == 0


Expand Down

0 comments on commit 082bfc0

Please sign in to comment.