Skip to content

Commit 2f93514

Browse files
overload show_folder
1 parent 687d281 commit 2f93514

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

bioblend/galaxy/folders/__init__.py

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
List,
1111
Literal,
1212
Optional,
13+
overload,
1314
TYPE_CHECKING,
1415
Union,
1516
)
@@ -47,6 +48,22 @@ def create_folder(self, parent_folder_id: str, name: str, description: Optional[
4748
payload["description"] = description
4849
return self._post(payload=payload, id=parent_folder_id)
4950

51+
@overload
52+
def show_folder(
53+
self,
54+
folder_id: str,
55+
) -> Dict[str, Any]: ...
56+
57+
@overload
58+
def show_folder(
59+
self,
60+
folder_id: str,
61+
contents: bool = False,
62+
limit: int = 10,
63+
offset: int = 0,
64+
include_deleted: bool = False,
65+
) -> Dict[str, Any]: ...
66+
5067
def show_folder(
5168
self,
5269
folder_id: str,
@@ -78,7 +95,13 @@ def show_folder(
7895
Only considered for contents=True.
7996
8097
:rtype: dict
81-
:return: dictionary including details of the folder
98+
:return: dictionary including details of the folder.
99+
For contents=False the dict contains infos on the folder.
100+
For contents=True the dict contains the keys "metadata" (a dict with
101+
infos on the folder) and "folder_contents" (a list of dicts with info
102+
on the childs).
103+
104+
Notes: For iterating over folder contents there is also contents_iter.
82105
"""
83106
params = {
84107
"limit": limit,

0 commit comments

Comments
 (0)