From 64674e045889c67db077517b012f864ac6615224 Mon Sep 17 00:00:00 2001 From: henribru <6639509+henribru@users.noreply.github.com> Date: Sun, 19 Nov 2023 10:49:55 +0100 Subject: [PATCH] Fix leftover http issues --- googleapiclient-stubs/http.pyi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/googleapiclient-stubs/http.pyi b/googleapiclient-stubs/http.pyi index 82fc8425..c14be215 100644 --- a/googleapiclient-stubs/http.pyi +++ b/googleapiclient-stubs/http.pyi @@ -4,7 +4,7 @@ import logging import typing import httplib2 -from _typeshed import Incomplete +from _typeshed import Incomplete, StrPath from googleapiclient.errors import ( BatchError as BatchError, @@ -60,7 +60,7 @@ class MediaIoBaseUpload(MediaUpload): class MediaFileUpload(MediaIoBaseUpload): def __init__( self, - filename: str, # TODO: StrPath? + filename: StrPath, mimetype: str | None = None, chunksize: int = 104857600, resumable: bool = False, @@ -76,7 +76,7 @@ class MediaInMemoryUpload(MediaIoBaseUpload): ) -> None: ... class MediaIoBaseDownload: - def __init__(self, fd, request, chunksize: int = 104857600) -> None: ... + def __init__(self, fd: io.IOBase, request: HttpRequest, chunksize: int = 104857600) -> None: ... def next_chunk( self, num_retries: int = 0 ) -> tuple[MediaDownloadProgress, bool]: ... @@ -85,7 +85,7 @@ class HttpRequest: uri: str method: str body: str | None - headers: dict | None + headers: dict[str, str] | None methodId: str | None http: httplib2.Http | HttpMock postproc: collections.abc.Callable[[httplib2.Response, bytes], typing.Any] @@ -101,7 +101,7 @@ class HttpRequest: uri: str, method: str = "GET", body: str | None = None, - headers: dict | None = None, + headers: dict[str, str] | None = None, methodId: str | None = None, resumable: MediaUpload | None = None, ) -> None: ...