We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f4eb3c6 commit 6792027Copy full SHA for 6792027
web3/_utils/method_formatters.py
@@ -161,12 +161,12 @@ def type_aware_apply_formatters_to_dict(
161
"""
162
Preserve ``AttributeDict`` types if original ``value`` was an ``AttributeDict``.
163
164
- formatted_dict: Dict[str, Any] = apply_formatters_to_dict(formatters, dict(value))
165
- return (
166
- AttributeDict.recursive(formatted_dict)
167
- if is_attrdict(value)
168
- else formatted_dict
169
- )
+ formatted_dict: Dict[str, Any]
+ if is_attrdict(value):
+ formatted_dict = apply_formatters_to_dict(formatters, dict(value))
+ return AttributeDict.recursive(formatted_dict)
+ else:
+ return apply_formatters_to_dict(formatters, value)
170
171
172
def type_aware_apply_formatters_to_dict_keys_and_values(
0 commit comments