Skip to content

Commit c085ca2

Browse files
committed
Update method_formatters.py
1 parent 923de71 commit c085ca2

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

web3/_utils/method_formatters.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -171,12 +171,9 @@ def type_aware_apply_formatters_to_dict(
171171
if isinstance(value, BaseModel):
172172
value = value.model_dump(by_alias=True)
173173

174-
formatted_dict: Dict[str, Any] = apply_formatters_to_dict(formatters, dict(value))
175-
return (
176-
AttributeDict.recursive(formatted_dict)
177-
if is_attrdict(value)
178-
else formatted_dict
179-
)
174+
formatted: Dict[str, Any]
175+
formatted = apply_formatters_to_dict(formatters, value)
176+
return AttributeDict.recursive(formatted) if is_attrdict(value) else formatted
180177

181178

182179
def type_aware_apply_formatters_to_dict_keys_and_values(

0 commit comments

Comments
 (0)