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
A lot of new typing for requests was introduced with #7696. This is great! Except there's a minor bug that doesn't line up with requests actual accepted types.
The first element of the tuples for _Files should be Optional[str]:
A lot of new typing for
requests
was introduced with #7696. This is great! Except there's a minor bug that doesn't line up with requests actual accepted types.The first element of the tuples for
_Files
should beOptional[str]
:typeshed/stubs/requests/requests/sessions.pyi
Lines 51 to 56 in bfa9188
The files arg is passed through a bunch of layers within requests and eventually actually handled here:
https://github.com/psf/requests/blob/fa1b0a367abc8488542f7ce7c02a3614ad8aa09d/requests/models.py#L143-L169
The first arg of a tuple becomes the
filename
passed tourllib3.fields.RequestField
, which is typed as optional:https://github.com/urllib3/urllib3/blob/e16beb210c03c6f5ce4e0908bddb6556442b6a37/src/urllib3/fields.py#L178-L185
The text was updated successfully, but these errors were encountered: