From c803d6b9b2e865b43cf0e8f3f924348ecea44e19 Mon Sep 17 00:00:00 2001 From: carefree0910 Date: Tue, 15 Oct 2024 20:19:40 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8Followed=20`mypy`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/toolkit/misc.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/toolkit/misc.py b/core/toolkit/misc.py index 2c152eb..3db98bb 100644 --- a/core/toolkit/misc.py +++ b/core/toolkit/misc.py @@ -995,7 +995,7 @@ def _construct(t: Type, d: Dict[str, Any]) -> Any: setattr( instance, field.name, - _construct(field.type, getattr(instance, field.name)), + _construct(field.type, getattr(instance, field.name)), # type: ignore ) continue t_origin = getattr(field.type, "__origin__", None) @@ -1008,7 +1008,7 @@ def _construct(t: Type, d: Dict[str, Any]) -> Any: instance, field.name, [ - _construct(t_value, item) + _construct(t_value, item) # type: ignore for item in getattr(instance, field.name) ], ) @@ -1020,7 +1020,7 @@ def _construct(t: Type, d: Dict[str, Any]) -> Any: instance, field.name, { - k: _construct(t_value, v) + k: _construct(t_value, v) # type: ignore for k, v in getattr(instance, field.name).items() }, )