2121from collections .abc import Sequence
2222from dataclasses import dataclass
2323from datetime import UTC , datetime
24+ from typing import Any
2425
2526from .generated .rpc import (
2627 SessionFSError ,
@@ -128,36 +129,36 @@ class _SessionFsAdapter:
128129 def __init__ (self , provider : SessionFsProvider ) -> None :
129130 self ._p = provider
130131
131- async def read_file (self , params : object ) -> SessionFSReadFileResult :
132+ async def read_file (self , params : Any ) -> SessionFSReadFileResult :
132133 try :
133134 content = await self ._p .read_file (params .path ) # type: ignore[attr-defined]
134135 return SessionFSReadFileResult .from_dict ({"content" : content })
135136 except Exception as exc :
136137 err = _to_session_fs_error (exc )
137138 return SessionFSReadFileResult .from_dict ({"content" : "" , "error" : err .to_dict ()})
138139
139- async def write_file (self , params : object ) -> SessionFSError | None :
140+ async def write_file (self , params : Any ) -> SessionFSError | None :
140141 try :
141142 await self ._p .write_file (params .path , params .content , getattr (params , "mode" , None )) # type: ignore[attr-defined]
142143 return None
143144 except Exception as exc :
144145 return _to_session_fs_error (exc )
145146
146- async def append_file (self , params : object ) -> SessionFSError | None :
147+ async def append_file (self , params : Any ) -> SessionFSError | None :
147148 try :
148149 await self ._p .append_file (params .path , params .content , getattr (params , "mode" , None )) # type: ignore[attr-defined]
149150 return None
150151 except Exception as exc :
151152 return _to_session_fs_error (exc )
152153
153- async def exists (self , params : object ) -> SessionFSExistsResult :
154+ async def exists (self , params : Any ) -> SessionFSExistsResult :
154155 try :
155156 result = await self ._p .exists (params .path ) # type: ignore[attr-defined]
156157 return SessionFSExistsResult .from_dict ({"exists" : result })
157158 except Exception :
158159 return SessionFSExistsResult .from_dict ({"exists" : False })
159160
160- async def stat (self , params : object ) -> SessionFSStatResult :
161+ async def stat (self , params : Any ) -> SessionFSStatResult :
161162 try :
162163 info = await self ._p .stat (params .path ) # type: ignore[attr-defined]
163164 return SessionFSStatResult (
@@ -179,7 +180,7 @@ async def stat(self, params: object) -> SessionFSStatResult:
179180 error = err ,
180181 )
181182
182- async def mkdir (self , params : object ) -> SessionFSError | None :
183+ async def mkdir (self , params : Any ) -> SessionFSError | None :
183184 try :
184185 await self ._p .mkdir (
185186 params .path , # type: ignore[attr-defined]
@@ -190,15 +191,15 @@ async def mkdir(self, params: object) -> SessionFSError | None:
190191 except Exception as exc :
191192 return _to_session_fs_error (exc )
192193
193- async def readdir (self , params : object ) -> SessionFSReaddirResult :
194+ async def readdir (self , params : Any ) -> SessionFSReaddirResult :
194195 try :
195196 entries = await self ._p .readdir (params .path ) # type: ignore[attr-defined]
196197 return SessionFSReaddirResult .from_dict ({"entries" : entries })
197198 except Exception as exc :
198199 err = _to_session_fs_error (exc )
199200 return SessionFSReaddirResult .from_dict ({"entries" : [], "error" : err .to_dict ()})
200201
201- async def readdir_with_types (self , params : object ) -> SessionFSReaddirWithTypesResult :
202+ async def readdir_with_types (self , params : Any ) -> SessionFSReaddirWithTypesResult :
202203 try :
203204 entries = await self ._p .readdir_with_types (params .path ) # type: ignore[attr-defined]
204205 return SessionFSReaddirWithTypesResult (entries = list (entries ))
@@ -208,7 +209,7 @@ async def readdir_with_types(self, params: object) -> SessionFSReaddirWithTypesR
208209 {"entries" : [], "error" : err .to_dict ()}
209210 )
210211
211- async def rm (self , params : object ) -> SessionFSError | None :
212+ async def rm (self , params : Any ) -> SessionFSError | None :
212213 try :
213214 await self ._p .rm (
214215 params .path , # type: ignore[attr-defined]
@@ -219,14 +220,14 @@ async def rm(self, params: object) -> SessionFSError | None:
219220 except Exception as exc :
220221 return _to_session_fs_error (exc )
221222
222- async def rename (self , params : object ) -> SessionFSError | None :
223+ async def rename (self , params : Any ) -> SessionFSError | None :
223224 try :
224225 await self ._p .rename (params .src , params .dest ) # type: ignore[attr-defined]
225226 return None
226227 except Exception as exc :
227228 return _to_session_fs_error (exc )
228229
229- async def sqlite_query (self , params : object ) -> SessionFSSqliteQueryResult :
230+ async def sqlite_query (self , params : Any ) -> SessionFSSqliteQueryResult :
230231 try :
231232 return await self ._p .sqlite_query ( # type: ignore[attr-defined]
232233 params .session_id ,
@@ -242,7 +243,7 @@ async def sqlite_query(self, params: object) -> SessionFSSqliteQueryResult:
242243 error = _to_session_fs_error (exc ),
243244 )
244245
245- async def sqlite_exists (self , params : object ) -> SessionFSSqliteExistsResult :
246+ async def sqlite_exists (self , params : Any ) -> SessionFSSqliteExistsResult :
246247 try :
247248 result = await self ._p .sqlite_exists (params .session_id ) # type: ignore[attr-defined]
248249 return SessionFSSqliteExistsResult .from_dict ({"exists" : result })
0 commit comments