11from abc import ABC
2+ from io import BytesIO
23from typing import TYPE_CHECKING , Callable , Literal
34
4- from .data import StatusData , LogsData , BackupData , AppData
5+ from .data import StatusData , LogsData , BackupData , AppData , FileInfo
56from .errors import SquareException
67from .http import Response , HTTPClient , Endpoint
78from .listener import ListenerManager , Listener
@@ -285,7 +286,7 @@ async def commit(self, file: File,
285286 return response
286287
287288 async def files_list (self , path : str , ** kwargs ):
288- response : Response = await self .client .app_files_list (self .id , path )
289+ response : list [ FileInfo ] = await self .client .app_files_list (self .id , path )
289290
290291 if not kwargs .get ('avoid_listener' ):
291292 endpoint : Endpoint = Endpoint .files_list ()
@@ -294,7 +295,7 @@ async def files_list(self, path: str, **kwargs):
294295 return response
295296
296297 async def read_file (self , path : str , ** kwargs ):
297- response : Response = await self .client .read_app_file (self .id , path )
298+ response : BytesIO = await self .client .read_app_file (self .id , path )
298299 if not kwargs .get ('avoid_listener' ):
299300 endpoint : Endpoint = Endpoint .files_read ()
300301 await self ._listener .on_capture (endpoint = endpoint ,
0 commit comments