Skip to content

Commit bcb5b33

Browse files
committed
improve docstrings
1 parent 98d1092 commit bcb5b33

File tree

1 file changed

+16
-19
lines changed

1 file changed

+16
-19
lines changed

synapseclient/models/schema_organization.py

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -127,14 +127,14 @@ def get_json_schemas(
127127
self, synapse_client: Optional["Synapse"] = None
128128
) -> Generator["JSONSchema", None, None]:
129129
"""
130-
Gets the list of JSON Schemas that are part of this organization
130+
Gets the JSON Schemas that are part of this organization
131131
132132
Arguments:
133133
synapse_client: If not passed in and caching was not disabled by
134134
`Synapse.allow_client_caching(False)` this will use the last created
135135
instance from the Synapse class constructor
136136
137-
Returns: A list of JSONSchema objects
137+
Returns: A Generator containing the JSONSchemas that belong to this organization
138138
139139
Example: Get the JSONSchemas that are part of this SchemaOrganization
140140
 
@@ -165,13 +165,10 @@ def get_acl(self, synapse_client: Optional["Synapse"] = None) -> dict[str, Any]:
165165
synapse_client: If not passed in and caching was not disabled by
166166
`Synapse.allow_client_caching(False)` this will use the last created
167167
instance from the Synapse class constructor
168-
synapse_client: If not passed in and caching was not disabled by
169-
`Synapse.allow_client_caching(False)` this will use the last created
170-
instance from the Synapse class constructor
171168
172169
Returns:
173170
A dictionary in the form of this response:
174-
https://rest-docs.synapse.org/rest/org/sagebionetworks/repo/model/AccessControlList.html
171+
[AccessControlList]https://rest-docs.synapse.org/rest/org/sagebionetworks/repo/model/AccessControlList.html
175172
176173
Example: Get the ACL for the SchemaOrganization
177174
 
@@ -199,10 +196,10 @@ def update_acl(
199196
Updates the ACL for a principal for this organization
200197
201198
Arguments:
202-
principal_id: the id of the principal whose permissions are to be updates
199+
principal_id: the id of the principal whose permissions are to be updated
203200
access_type: List of permission types (e.g., ["READ", "CREATE", "DELETE"])
204201
see:
205-
https://rest-docs.synapse.org/rest/org/sagebionetworks/repo/model/ResourceAccess.html
202+
[ACCESS_TYPE]https://rest-docs.synapse.org/rest/org/sagebionetworks/repo/model/ACCESS_TYPE.html
206203
synapse_client: If not passed in and caching was not disabled by
207204
`Synapse.allow_client_caching(False)` this will use the last created
208205
instance from the Synapse class constructor
@@ -396,9 +393,9 @@ async def get_json_schemas_async(
396393
self, synapse_client: Optional["Synapse"] = None
397394
) -> AsyncGenerator["JSONSchema", None]:
398395
"""
399-
Gets the JSON Schemas that are part of this organization
396+
Gets the JSONSchemas that are part of this organization
400397
401-
Returns: An AsyncGenerator of JSONSchema objects
398+
Returns: An AsyncGenerator of JSONSchemas
402399
403400
Raises:
404401
ValueError: If the name has not been set
@@ -453,7 +450,7 @@ async def get_acl_async(
453450
454451
Returns:
455452
A dictionary in the form of this response:
456-
https://rest-docs.synapse.org/rest/org/sagebionetworks/repo/model/AccessControlList.html
453+
[AccessControlList]https://rest-docs.synapse.org/rest/org/sagebionetworks/repo/model/AccessControlList.html
457454
458455
Example: Get the ACL for a SchemaOrganization
459456
 
@@ -501,7 +498,7 @@ async def update_acl_async(
501498
principal_id: the id of the principal whose permissions are to be updates
502499
access_type: List of permission types (e.g., ["READ", "CREATE", "DELETE"])
503500
see:
504-
https://rest-docs.synapse.org/rest/org/sagebionetworks/repo/model/ResourceAccess.html
501+
[ACCESS_TYPE]https://rest-docs.synapse.org/rest/org/sagebionetworks/repo/model/ACCESS_TYPE.html
505502
synapse_client: If not passed in and caching was not disabled by
506503
`Synapse.allow_client_caching(False)` this will use the last created
507504
instance from the Synapse class constructor
@@ -557,7 +554,7 @@ def fill_from_dict(self, response: dict[str, Any]) -> "SchemaOrganization":
557554
558555
Args:
559556
response: A response from this endpoint:
560-
https://rest-docs.synapse.org/rest/org/sagebionetworks/repo/model/schema/Organization.html
557+
[Organization]https://rest-docs.synapse.org/rest/org/sagebionetworks/repo/model/schema/Organization.html
561558
562559
Returns:
563560
Itself
@@ -577,7 +574,7 @@ class JSONSchemaProtocol(Protocol):
577574

578575
def get(self, synapse_client: Optional["Synapse"] = None) -> "JSONSchema":
579576
"""
580-
Gets this JSON Schemas metadata
577+
Gets this JSONSchemas metadata
581578
582579
Arguments:
583580
synapse_client: If not passed in and caching was not disabled by
@@ -647,7 +644,7 @@ def store(
647644

648645
def delete(self) -> None:
649646
"""
650-
Deletes this JSON Schema
647+
Deletes this JSONSchema
651648
652649
Arguments:
653650
synapse_client: If not passed in and caching was not disabled by
@@ -708,7 +705,7 @@ def get_body(
708705
self, version: Optional[str] = None, synapse_client: Optional["Synapse"] = None
709706
) -> dict[str, Any]:
710707
"""
711-
Gets the JSON body for the schema.
708+
Gets the body of this JSONSchema.
712709
713710
Arguments:
714711
version: Defaults to None.
@@ -795,7 +792,7 @@ async def get_async(
795792
self, synapse_client: Optional["Synapse"] = None
796793
) -> "JSONSchema":
797794
"""
798-
Gets this JSON Schemas metadata
795+
Gets the metadata for this JSONSchema from Synapse
799796
800797
Arguments:
801798
synapse_client: If not passed in and caching was not disabled by
@@ -919,7 +916,7 @@ async def store_schema():
919916

920917
async def delete_async(self, synapse_client: Optional["Synapse"] = None) -> None:
921918
"""
922-
Deletes this JSONSchema
919+
Deletes this JSONSchema from Synapse
923920
924921
Arguments:
925922
synapse_client: If not passed in and caching was not disabled by
@@ -1006,7 +1003,7 @@ async def get_body_async(
10061003
self, version: Optional[str] = None, synapse_client: Optional["Synapse"] = None
10071004
) -> dict[str, Any]:
10081005
"""
1009-
Gets the JSON body for the schema.
1006+
Gets the body of this JSONSchema
10101007
10111008
Arguments:
10121009
version: Defaults to None.

0 commit comments

Comments
 (0)