Skip to content

Commit

Permalink
Finish get_nested_types for now
Browse files Browse the repository at this point in the history
  • Loading branch information
SeanMcOwen committed Jan 31, 2025
1 parent 0a9f4a0 commit cf52b40
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/math_spec_mapping/Convenience/cadCAD.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

def get_underlying_type(data):
if type(data) == _GenericAlias:
data.__args__ = [get_underlying_type(x) for x in data.__args__]
data = [get_underlying_type(x) for x in data.__args__]
elif type(data) == _TypedDictMeta:
data = get_nested_types(data.__annotations__)
return data
Expand All @@ -13,7 +13,6 @@ def get_underlying_type(data):
def get_nested_types(data):
data = deepcopy(data)
for key in data:
print(type(data[key]))
if type(data[key]) == _TypedDictMeta:
data[key] = get_nested_types(data[key].__annotations__)
elif type(data[key]) == _GenericAlias:
Expand Down

0 comments on commit cf52b40

Please sign in to comment.