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(
628
628
@prettify_pydantic
629
629
@pydantic .validate_call
630
630
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 ,
632
634
) -> Folder | None :
633
635
"""Retrieve a folder by identifier
634
636
@@ -637,6 +639,10 @@ def get_folder(
637
639
folder_path : str
638
640
the path of the folder to retrieve on the server.
639
641
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.
640
646
641
647
Returns
642
648
-------
@@ -654,6 +660,8 @@ def get_folder(
654
660
655
661
try :
656
662
_ , _folder = next (_folders )
663
+ if not read_only :
664
+ _folder .read_only (read_only )
657
665
return _folder
658
666
except StopIteration :
659
667
return None
You can’t perform that action at this time.
0 commit comments