From 76457f39c29deec366a1960ebcd746c45fa1f400 Mon Sep 17 00:00:00 2001 From: jinzhijie <34389622+jinzhijie@users.noreply.github.com> Date: Fri, 3 Feb 2023 18:09:03 +0800 Subject: [PATCH] Fix YggdrasilTextures model --- pyproject.toml | 2 +- src/yggdrasil_mc/model.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 0f66cb8..1de891a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "yggdrasil-mc" -version = "0.1b2" +version = "0.1b3" authors = [ { name="Xiao_Jin", email="i@xiaojin233.cn" }, ] diff --git a/src/yggdrasil_mc/model.py b/src/yggdrasil_mc/model.py index 5071e1d..b4b8cd8 100644 --- a/src/yggdrasil_mc/model.py +++ b/src/yggdrasil_mc/model.py @@ -3,7 +3,7 @@ from datetime import date from typing import Literal -from pydantic import BaseModel, root_validator +from pydantic import BaseModel, Field, root_validator class YggdrasilPlayerUuidApi(BaseModel): @@ -39,8 +39,8 @@ class _Cape(BaseModel): root_validator(pre=True, allow_reuse=True)(_make_hash) - skin: _Skin | None = _Skin() - cape: _Cape | None = _Cape() + skin: _Skin = Field(default_factory=_Skin, alias="SKIN") + cape: _Cape = Field(default_factory=_Cape, alias="CAPE") class YggdrasilPropertiesTextures(BaseModel):