Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Jonathan Keane <[email protected]>
  • Loading branch information
schloerke and jonkeane authored Nov 22, 2024
1 parent ba02668 commit c3261ed
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/posit/connect/permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,15 +150,15 @@ def get(self, uid: str) -> Permission:
return Permission(self.params, **response.json())

def destroy(self, *permissions: str | Group | User | Permission) -> list[Permission]:
"""Destroy supplied content item permissions.
"""Remove supplied content item permissions.
Removes all provided permissions from the content item's permissions.
Parameters
----------
*permissions : str | Group | User | Permission
The content item permissions to remove. If a `str` is received, it is compared against
the Permissions' `principal_gruid`. If a `Group`, `User`, or `Permission` is received,
the Permissions' `principal_guid`. If a `Group`, `User`, or `Permission` is received,
the `guid` is used and compared against the Permissions' `principal_guid`. If a
`Permission` is received, the `principal_guid` is used. Note, only the associated permissions will be destroyed; Any users or groups provided will remain.
Expand Down Expand Up @@ -220,7 +220,7 @@ def destroy(self, *permissions: str | Group | User | Permission) -> list[Permiss
principal_guid: str = arg["principal_guid"]
else:
raise TypeError(
f"destroy() expected argument type 'str', 'Group', 'Permission' or 'User', but got '{type(arg).__name__}'",
f"destroy() expected argument type 'str', 'User', 'Group', or 'Permission' but got '{type(arg).__name__}'",
)
principal_guids.add(principal_guid)

Expand Down

0 comments on commit c3261ed

Please sign in to comment.