Skip to content
Myr

Allow tuple or list for multipart values (#2355)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Tom Christie · committed by GitHub · parent ccd98b1 · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:httpx/_multipart.py+1 added-1 removed
203 unmodified lines
204 def _iter_fields(205 self, data: dict, files: RequestFiles206 ) -> typing.Iterator[typing.Union[FileField, DataField]]:207 for name, value in data.items():208 if isinstance(value, list):208 if isinstance(value, (tuple, list)):209 for item in value:210 yield DataField(name=name, value=item)211 else:212 yield DataField(name=name, value=value)
38 unmodified lines