File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -628,7 +628,9 @@ def get_artifacts_as_files(
628628 @prettify_pydantic
629629 @pydantic .validate_call
630630 def get_folder (
631- self , folder_path : typing .Annotated [str , pydantic .Field (pattern = FOLDER_REGEX )]
631+ self ,
632+ folder_path : typing .Annotated [str , pydantic .Field (pattern = FOLDER_REGEX )],
633+ read_only : bool = True ,
632634 ) -> Folder | None :
633635 """Retrieve a folder by identifier
634636
@@ -637,6 +639,10 @@ def get_folder(
637639 folder_path : str
638640 the path of the folder to retrieve on the server.
639641 Paths are prefixed with `/`
642+ read_only : bool, optional
643+ whether the returned object should be editable or not,
644+ default is True, the object is a cached copy of data
645+ from the server.
640646
641647 Returns
642648 -------
@@ -654,6 +660,8 @@ def get_folder(
654660
655661 try :
656662 _ , _folder = next (_folders )
663+ if not read_only :
664+ _folder .read_only (read_only )
657665 return _folder
658666 except StopIteration :
659667 return None
You can’t perform that action at this time.
0 commit comments