@@ -4,7 +4,7 @@ import logging
44import typing
55
66import httplib2
7- from _typeshed import Incomplete
7+ from _typeshed import Incomplete , StrPath
88
99from googleapiclient .errors import (
1010 BatchError as BatchError ,
@@ -60,7 +60,7 @@ class MediaIoBaseUpload(MediaUpload):
6060class MediaFileUpload (MediaIoBaseUpload ):
6161 def __init__ (
6262 self ,
63- filename : str , # TODO: StrPath?
63+ filename : StrPath ,
6464 mimetype : str | None = None ,
6565 chunksize : int = 104857600 ,
6666 resumable : bool = False ,
@@ -76,7 +76,9 @@ class MediaInMemoryUpload(MediaIoBaseUpload):
7676 ) -> None : ...
7777
7878class MediaIoBaseDownload :
79- def __init__ (self , fd , request , chunksize : int = 104857600 ) -> None : ...
79+ def __init__ (
80+ self , fd : io .IOBase , request : HttpRequest , chunksize : int = 104857600
81+ ) -> None : ...
8082 def next_chunk (
8183 self , num_retries : int = 0
8284 ) -> tuple [MediaDownloadProgress , bool ]: ...
@@ -85,7 +87,7 @@ class HttpRequest:
8587 uri : str
8688 method : str
8789 body : str | None
88- headers : dict | None
90+ headers : dict [ str , str ] | None
8991 methodId : str | None
9092 http : httplib2 .Http | HttpMock
9193 postproc : collections .abc .Callable [[httplib2 .Response , bytes ], typing .Any ]
@@ -101,7 +103,7 @@ class HttpRequest:
101103 uri : str ,
102104 method : str = "GET" ,
103105 body : str | None = None ,
104- headers : dict | None = None ,
106+ headers : dict [ str , str ] | None = None ,
105107 methodId : str | None = None ,
106108 resumable : MediaUpload | None = None ,
107109 ) -> None : ...
0 commit comments