You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
requests: allow passing a list of tuples for files #7998
The files argument in the requests library is incompletely typed. The current types include the Mapping type (over which there has been considerable discourse already), but the official requests documentation states:
You can send multiple files in one request. [...]
To do that, just set files to a list of tuples of (form_field_name, file_info):
This snippet currently fails typechecking with the latest stubs. A minimal reproduction is available here, which also confirms the code works as expected, but fails with.
Activity
tommilligan commentedon May 31, 2022
A suggested fix for this issue has been opened at #7999
Add infrastructure allowing for test cases for third-party stubs (#8700)