Skip to content

Commit

Permalink
roles: fixing docstring members and unnecessary parenthesis
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Lavu authored and pbrezina committed Apr 11, 2024
1 parent fb88f54 commit 38f852d
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 30 deletions.
10 changes: 5 additions & 5 deletions sssd_test_framework/roles/ad.py
Original file line number Diff line number Diff line change
Expand Up @@ -988,8 +988,8 @@ def add_members(self, members: list[ADUser | ADGroup]) -> ADGroup:
"""
Add multiple group members.
:param member: List of users or groups to add as members.
:type member: list[ADUser | ADGroup]
:param members: List of users or groups to add as members.
:type members: list[ADUser | ADGroup]
:return: Self.
:rtype: ADGroup
"""
Expand All @@ -1016,8 +1016,8 @@ def remove_members(self, members: list[ADUser | ADGroup]) -> ADGroup:
"""
Remove multiple group members.
:param member: List of users or groups to remove from the group.
:type member: list[ADUser | ADGroup]
:param members: List of users or groups to remove from the group.
:type members: list[ADUser | ADGroup]
:return: Self.
:rtype: ADGroup
"""
Expand Down Expand Up @@ -1191,7 +1191,7 @@ def __members(self, members: list[ADNetgroupMember]) -> tuple[list[str], list[st
if triple is not None:
triples.append(triple)

return (triples, netgroups)
return triples, netgroups


class ADSudoRule(ADObject):
Expand Down
16 changes: 8 additions & 8 deletions sssd_test_framework/roles/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -503,8 +503,8 @@ def add_members(self, members: list[GenericUser | GenericGroup]) -> GenericGroup
"""
Add multiple group members.
:param member: List of users or groups to add as members.
:type member: list[GenericUser | GenericGroup]
:param members: List of users or groups to add as members.
:type members: list[GenericUser | GenericGroup]
:return: Self.
:rtype: GenericGroup
"""
Expand All @@ -527,8 +527,8 @@ def remove_members(self, members: list[GenericUser | GenericGroup]) -> GenericGr
"""
Remove multiple group members.
:param member: List of users or groups to remove from the group.
:type member: list[GenericUser | GenericGroup]
:param members: List of users or groups to remove from the group.
:type members: list[GenericUser | GenericGroup]
:return: Self.
:rtype: GenericGroup
"""
Expand Down Expand Up @@ -604,8 +604,8 @@ def add_members(self, members: list[GenericNetgroupMember]) -> GenericNetgroup:
"""
Add multiple netgroup members at once.
:param member: List of netgroup members to add.
:type member: list[GenericNetgroupMember]
:param members: List of netgroup members to add.
:type members: list[GenericNetgroupMember]
:return: Self.
:rtype: GenericNetgroup
"""
Expand Down Expand Up @@ -638,8 +638,8 @@ def remove_members(self, members: list[GenericNetgroupMember]) -> GenericNetgrou
"""
Remove multiple group members.
:param member: List of netgroup members to add.
:type member: list[GenericNetgroupMember]
:param members: List of netgroup members to add.
:type members: list[GenericNetgroupMember]
:return: Self.
:rtype: GenericNetroup
"""
Expand Down
18 changes: 9 additions & 9 deletions sssd_test_framework/roles/ipa.py
Original file line number Diff line number Diff line change
Expand Up @@ -675,8 +675,8 @@ def add_members(self, members: list[IPAUser | IPAGroup | str]) -> IPAGroup:
Member can be either IPAUser, IPAGroup or a string in which case it
is added as an external member.
:param member: List of users or groups to add as members.
:type member: list[IPAUser | IPAGroup | str]
:param members: List of users or groups to add as members.
:type members: list[IPAUser | IPAGroup | str]
:return: Self.
:rtype: IPAGroup
"""
Expand Down Expand Up @@ -704,8 +704,8 @@ def remove_members(self, members: list[IPAUser | IPAGroup | str]) -> IPAGroup:
Member can be either IPAUser, IPAGroup or a string in which case
an external member is removed.
:param member: List of users or groups to remove from the group.
:type member: list[IPAUser | IPAGroup | str]
:param members: List of users or groups to remove from the group.
:type members: list[IPAUser | IPAGroup | str]
:return: Self.
:rtype: IPAGroup
"""
Expand Down Expand Up @@ -1137,7 +1137,7 @@ def __get_commands(self, value: str | list[str] | None) -> tuple[list[str], list

allow_commands.append(cmd)

return (allow_commands, deny_commands, category)
return allow_commands, deny_commands, category

def __get_hosts(self, value: str | list[str] | None) -> tuple[list[str], str]:
hosts = []
Expand All @@ -1149,7 +1149,7 @@ def __get_hosts(self, value: str | list[str] | None) -> tuple[list[str], str]:

hosts.append(host)

return (hosts, category)
return hosts, category

def __get_users_and_groups(
self, value: str | IPAUser | IPAGroup | list[str | IPAUser | IPAGroup] | None
Expand Down Expand Up @@ -1180,7 +1180,7 @@ def __get_users_and_groups(

raise ValueError(f"Unsupported type: {type(item)}")

return (users, groups, category)
return users, groups, category

def __get_run_as_user(
self, value: str | IPAUser | IPAGroup | list[str | IPAUser | IPAGroup] | None
Expand All @@ -1189,7 +1189,7 @@ def __get_run_as_user(
if category:
category = "--runasusercat=all"

return (users, groups, category)
return users, groups, category

def __get_run_as_group(self, value: str | IPAGroup | list[str | IPAGroup] | None) -> tuple[list[str], str]:
groups = []
Expand All @@ -1209,7 +1209,7 @@ def __get_run_as_group(self, value: str | IPAGroup | list[str | IPAGroup] | None

raise ValueError(f"Unsupported type: {type(item)}")

return (groups, category)
return groups, category

def __args_from_list(self, option: str, value: list[str]) -> str:
if not value:
Expand Down
8 changes: 4 additions & 4 deletions sssd_test_framework/roles/keycloak.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,8 @@ def add_members(self, members: list[KeycloakUser | KeycloakGroup]) -> KeycloakGr
"""
Add multiple group members.
:param member: List of users or groups to add as members.
:type member: list[KeycloakUser | KeycloakGroup]
:param members: List of users or groups to add as members.
:type members: list[KeycloakUser | KeycloakGroup]
:return: Self.
:rtype: KeycloakGroup
"""
Expand All @@ -248,8 +248,8 @@ def remove_members(self, members: list[KeycloakUser | KeycloakGroup]) -> Keycloa
"""
Remove multiple group members.
:param member: List of users or groups to remove from the group.
:type member: list[KeycloakUser | KeycloakGroup]
:param members: List of users or groups to remove from the group.
:type members: list[KeycloakUser | KeycloakGroup]
:return: Self.
:rtype: KeycloakGroup
"""
Expand Down
8 changes: 4 additions & 4 deletions sssd_test_framework/roles/samba.py
Original file line number Diff line number Diff line change
Expand Up @@ -644,8 +644,8 @@ def add_members(self, members: list[SambaUser | SambaGroup]) -> SambaGroup:
"""
Add multiple group members.
:param member: List of users or groups to add as members.
:type member: list[SambaUser | SambaGroup]
:param members: List of users or groups to add as members.
:type members: list[SambaUser | SambaGroup]
:return: Self.
:rtype: SambaGroup
"""
Expand All @@ -667,8 +667,8 @@ def remove_members(self, members: list[SambaUser | SambaGroup]) -> SambaGroup:
"""
Remove multiple group members.
:param member: List of users or groups to remove from the group.
:type member: list[SambaUser | SambaGroup]
:param members: List of users or groups to remove from the group.
:type members: list[SambaUser | SambaGroup]
:return: Self.
:rtype: SambaGroup
"""
Expand Down

0 comments on commit 38f852d

Please sign in to comment.