Skip to content

Commit 57d7d43

Browse files
committed
improve docstring
1 parent 8727204 commit 57d7d43

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

synapseclient/extensions/curator/record_based_metadata_task.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,11 +298,17 @@ def create_record_based_metadata_task(
298298

299299
def project_id_from_entity_id(entity_id: str, synapse_client: Synapse) -> str:
300300
"""
301-
Helper function to retrieve the project ID from a given entity ID by traversing up the hierarchy.
301+
Retrieves the project ID from a given entity ID by traversing up the the folder hierarchy
302302
303303
Args:
304304
entity_id: The Synapse ID of the entity (e.g., folder, file) to start from.
305305
synapse_client: Authenticated Synapse client instance
306+
307+
Returns:
308+
The Synapse ID of the project that the entity belongs to.
309+
310+
Raises:
311+
ValueError: If the project ID cannot be found within 1000 iterations.
306312
"""
307313

308314
# Get the project ID from the folder ID

0 commit comments

Comments
 (0)