Skip to content
This repository was archived by the owner on Mar 14, 2024. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion ib_insync/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ def tree(obj):
elif isinstance(obj, dict):
return {k: tree(v) for k, v in obj.items()}
elif isnamedtupleinstance(obj):
return {f: tree(getattr(obj, f)) for f in obj._fields}
return {obj.__class__.__name__: {
f: tree(getattr(obj, f)) for f in obj._fields}}
elif isinstance(obj, (list, tuple, set)):
return [tree(i) for i in obj]
elif is_dataclass(obj):
Expand Down