From c20b710e4882d30e043ffe7fd5ba010be811976c Mon Sep 17 00:00:00 2001 From: Scott Gasch Date: Thu, 8 Jun 2023 11:43:14 -0700 Subject: [PATCH] More Type -> type --- src/pyutils/dataclass_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pyutils/dataclass_utils.py b/src/pyutils/dataclass_utils.py index 22d483e..6d9e8a8 100644 --- a/src/pyutils/dataclass_utils.py +++ b/src/pyutils/dataclass_utils.py @@ -4,7 +4,7 @@ friendly wrappers around conversion to/from Dicts.""" import dataclasses -from typing import Any, Dict, Protocol, Type +from typing import Any, Dict, Protocol class Dataclass(Protocol): @@ -22,7 +22,7 @@ class Dataclass(Protocol): __dataclass_fields__: Dict -def dataclass_from_dict(dataclass: Type[Dataclass], d: Dict[str, Any]) -> Dataclass: +def dataclass_from_dict(dataclass: type[Dataclass], d: Dict[str, Any]) -> Dataclass: """Given a Dataclass type and a dict, return a populated instance. Args: -- 2.45.0