From a20890398082de6fe7b429bf3e57e6570240d3ae Mon Sep 17 00:00:00 2001 From: BrandonPacewic <92102436+BrandonPacewic@users.noreply.github.com> Date: Tue, 13 Aug 2024 17:13:00 -0700 Subject: [PATCH] Handled ignore typing section --- exporter/SynthesisFusionAddin/src/Types.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exporter/SynthesisFusionAddin/src/Types.py b/exporter/SynthesisFusionAddin/src/Types.py index 1d6edeb0c..5e2d7c967 100644 --- a/exporter/SynthesisFusionAddin/src/Types.py +++ b/exporter/SynthesisFusionAddin/src/Types.py @@ -3,7 +3,7 @@ import platform from dataclasses import MISSING, dataclass, field, fields, is_dataclass from enum import Enum, EnumType -from typing import Any, TypeAlias, get_origin +from typing import Any, TypeAlias, get_args, get_origin # Not 100% sure what this is for - Brandon JointParentType = Enum("JointParentType", ["ROOT", "END"]) @@ -103,7 +103,7 @@ def makeObjectFromJson(objType: type, data: Any) -> Any: elif isinstance(objType, PRIMITIVES) or isinstance(data, PRIMITIVES): return data elif get_origin(objType) is list: - return [makeObjectFromJson(objType.__args__[0], item) for item in data] # type: ignore[attr-defined] + return [makeObjectFromJson(get_args(objType)[0], item) for item in data] obj = objType() assert is_dataclass(obj) and isinstance(data, dict), "Found unsupported type to decode."