@@ -19,7 +19,7 @@ def query(
1919 ** kwargs : Any ) -> asyncio .Future [Any ]:
2020 ...
2121
22- async def collection_info (self , collection : int | str ) -> dict :
22+ async def collection_info (self , collection : int | str ) -> dict [ str , Any ] :
2323 """Returns information about a specific collection.
2424
2525 This function requires QUERY privileges on the requested collection,
@@ -32,7 +32,7 @@ async def collection_info(self, collection: int | str) -> dict:
3232 collection = collection ,
3333 scope = '@t' )
3434
35- async def collections_info (self ) -> list :
35+ async def collections_info (self ) -> list [ dict [ str , Any ]] :
3636 """Returns collection information about all collections in ThingsDB.
3737 """
3838 return await self .query ('collections_info()' , scope = '@t' )
@@ -205,10 +205,10 @@ async def has_user(self, name: str):
205205 """
206206 return await self .query ('has_user(name)' , name = name , scope = '@t' )
207207
208- async def module_info (self , name : str ) -> dict :
208+ async def module_info (self , name : str ) -> dict [ str , Any ] :
209209 return await self .query ('module_info(name)' , name = name , scope = '@t' )
210210
211- async def modules_info (self ) -> list :
211+ async def modules_info (self ) -> list [ dict [ str , Any ]] :
212212 return await self .query ('modules_info()' , scope = '@t' )
213213
214214 async def new_collection (self , name : str ):
@@ -369,49 +369,49 @@ async def set_time_zone(self, collection: int | str, zone: str):
369369 zone = zone ,
370370 scope = '@t' )
371371
372- async def time_zones_info (self ) -> list :
372+ async def time_zones_info (self ) -> list [ str ] :
373373 """Returns all available time zones in ThingsDB.
374374
375375 This function does not generate a change.
376376 """
377377 return await self .query ('time_zones_info()' , scope = '@t' )
378378
379- async def user_info (self , user : str | None = None ) -> dict :
379+ async def user_info (self , user : str | None = None ) -> dict [ str , Any ] :
380380 if user is None :
381381 return await self .query ('user_info()' , scope = '@t' )
382382 return await self .query ('user_info(user)' , user = user , scope = '@t' )
383383
384- async def users_info (self ) -> list :
384+ async def users_info (self ) -> list [ dict [ str , Any ]] :
385385 return await self .query ('users_info()' , scope = '@t' )
386386
387387 #
388388 # Build-in functions from the @node scope
389389 #
390390
391- async def backup_info (self , backup_id : int , scope = '@n' ):
391+ async def backup_info (self , backup_id : int , scope : str = '@n' ):
392392 return await self .query ('backup_info(id)' , id = backup_id , scope = scope )
393393
394- async def backups_info (self , scope = '@n' ) -> list :
394+ async def backups_info (self , scope : str = '@n' ) -> list [ dict [ str , Any ]] :
395395 return await self .query ('backups_info()' , scope = scope )
396396
397- async def backups_ok (self , scope = '@n' ) -> bool :
397+ async def backups_ok (self , scope : str = '@n' ) -> bool :
398398 return await self .query ('backups_ok()' , scope = scope )
399399
400- async def counters (self , scope = '@n' ):
400+ async def counters (self , scope : str = '@n' ):
401401 return await self .query ('counters()' , scope = scope )
402402
403403 async def del_backup (
404404 self ,
405405 backup_id : int ,
406406 delete_files : bool = False ,
407- scope = '@n' ):
407+ scope : str = '@n' ):
408408 return await self .query (
409409 'del_backup(id, delete_files)' ,
410410 id = backup_id ,
411411 delete_files = delete_files ,
412412 scope = scope )
413413
414- async def has_backup (self , backup_id : int , scope = '@n' ):
414+ async def has_backup (self , backup_id : int , scope : str = '@n' ):
415415 return await self .query ('has_backup(id)' , id = backup_id , scope = scope )
416416
417417 async def new_backup (
@@ -420,7 +420,7 @@ async def new_backup(
420420 start_ts : datetime .datetime | None = None ,
421421 repeat : int | None = 0 ,
422422 max_files : int | None = 7 ,
423- scope = '@n' ):
423+ scope : str = '@n' ):
424424
425425 ts = None if start_ts is None else int (start_ts .timestamp ())
426426
@@ -435,13 +435,13 @@ async def new_backup(
435435 max_files = max_files ,
436436 scope = scope )
437437
438- async def node_info (self , scope = '@n' ) -> dict :
438+ async def node_info (self , scope : str = '@n' ) -> dict [ str , Any ] :
439439 return await self .query ('node_info()' , scope = scope )
440440
441- async def nodes_info (self , scope = '@n' ) -> list :
441+ async def nodes_info (self , scope : str = '@n' ) -> list [ dict [ str , Any ]] :
442442 return await self .query ('nodes_info()' , scope = scope )
443443
444- async def reset_counters (self , scope = '@n' ) -> None :
444+ async def reset_counters (self , scope : str = '@n' ) -> None :
445445 """Resets the counters for the ThingsDB node you are connected too.
446446
447447 Other nodes are not affected. This will set the started_at counter
@@ -462,7 +462,7 @@ async def restart_module(self, name: str) -> None:
462462 """
463463 return await self .query ('restart_module(name)' , name = name , scope = '@t' )
464464
465- async def set_log_level (self , log_level : str , scope = '@n' ) -> None :
465+ async def set_log_level (self , log_level : str , scope : str = '@n' ) -> None :
466466 level = (
467467 'DEBUG' ,
468468 'INFO' ,
@@ -472,7 +472,7 @@ async def set_log_level(self, log_level: str, scope='@n') -> None:
472472 return await self .query (
473473 'set_log_level(log_level)' , log_level = level , scope = scope )
474474
475- async def shutdown (self , scope = '@n' ) -> None :
475+ async def shutdown (self , scope : str = '@n' ) -> None :
476476 """Shutdown the node in the selected scope.
477477
478478 This is a clean shutdown, allowing all other nodes (and clients) to
0 commit comments