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 6792027 commit ba0d358Copy full SHA for ba0d358
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]
165
- if is_attrdict(value):
166
- formatted_dict = apply_formatters_to_dict(formatters, dict(value))
167
- return AttributeDict.recursive(formatted_dict)
168
- else:
169
- return apply_formatters_to_dict(formatters, value)
+ formatted_dict: Dict[str, Any] = apply_formatters_to_dict(formatters, value)
+ return (
+ AttributeDict.recursive(formatted_dict)
+ if is_attrdict(value)
+ else formatted_dict
+ )
170
171
172
def type_aware_apply_formatters_to_dict_keys_and_values(
0 commit comments