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