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 @@ -631,7 +631,9 @@ def get_artifacts_as_files(
631631 @prettify_pydantic
632632 @pydantic .validate_call
633633 def get_folder (
634- self , folder_path : typing .Annotated [str , pydantic .Field (pattern = FOLDER_REGEX )]
634+ self ,
635+ folder_path : typing .Annotated [str , pydantic .Field (pattern = FOLDER_REGEX )],
636+ read_only : bool = True ,
635637 ) -> Folder | None :
636638 """Retrieve a folder by identifier
637639
@@ -640,6 +642,10 @@ def get_folder(
640642 folder_path : str
641643 the path of the folder to retrieve on the server.
642644 Paths are prefixed with `/`
645+ read_only : bool, optional
646+ whether the returned object should be editable or not,
647+ default is True, the object is a cached copy of data
648+ from the server.
643649
644650 Returns
645651 -------
@@ -657,6 +663,8 @@ def get_folder(
657663
658664 try :
659665 _ , _folder = next (_folders )
666+ if not read_only :
667+ _folder .read_only (read_only )
660668 return _folder
661669 except StopIteration :
662670 return None
You can’t perform that action at this time.
0 commit comments