From b792d975559de770d05acc69885b101fc1b3c92d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 29 Apr 2026 05:44:45 +0000 Subject: [PATCH 1/2] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20Update=20dependency=20?= =?UTF-8?q?ty=20to=20v0.0.33?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index b64110d9..4d986b55 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -196,7 +196,7 @@ dev = [ # hatch is required to support type hinting and proper packaging of the py.typed file. "hatch>=1.14.1", "isort==8.0.1", - "ty==0.0.32", + "ty==0.0.33", "prek>=0.3.3", "pre-commit-hooks==6.0.0", "pylint==4.0.5", From a91b291877f205dcf4bf374d94e84b6dcf342813 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 29 Apr 2026 15:14:56 +0000 Subject: [PATCH 2/2] fix: use validation_alias instead of alias for data_type fields in EntityInfo ty v0.0.33 improved pydantic model analysis and now correctly infers __init__ signatures. With alias=, the __init__ only accepts the alias parameter name (e.g. dataType), even when populate_by_name=True is set. Switching to validation_alias= keeps dataType accepted for JSON parsing while exposing the Python field name data_type as the __init__ parameter, which satisfies both ty's type checking and the existing tests. Agent-Logs-Url: https://github.com/liudger/python-bsblan/sessions/42f382e1-fe63-4644-8d29-ae0689a1c1b0 Co-authored-by: liudger <4112111+liudger@users.noreply.github.com> --- src/bsblan/models.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bsblan/models.py b/src/bsblan/models.py index 67165a1d..0c360a99 100644 --- a/src/bsblan/models.py +++ b/src/bsblan/models.py @@ -326,13 +326,13 @@ class EntityInfo(BaseModel, Generic[T]): unit: str desc: str value: T | None = None - data_type: int = Field(alias="dataType", default=0) + data_type: int = Field(validation_alias="dataType", default=0) error: int = 0 readonly: int = 0 readwrite: int = 0 precision: float | None = None - data_type_name: str = Field(default="", alias="dataType_name") - data_type_family: str = Field(default="", alias="dataType_family") + data_type_name: str = Field(default="", validation_alias="dataType_name") + data_type_family: str = Field(default="", validation_alias="dataType_family") @model_validator(mode="before") @classmethod