From 38f852d8659205af393bbd8c069bb0369f9f54c9 Mon Sep 17 00:00:00 2001 From: Dan Lavu Date: Wed, 10 Apr 2024 23:27:47 -0400 Subject: [PATCH] roles: fixing docstring members and unnecessary parenthesis --- sssd_test_framework/roles/ad.py | 10 +++++----- sssd_test_framework/roles/generic.py | 16 ++++++++-------- sssd_test_framework/roles/ipa.py | 18 +++++++++--------- sssd_test_framework/roles/keycloak.py | 8 ++++---- sssd_test_framework/roles/samba.py | 8 ++++---- 5 files changed, 30 insertions(+), 30 deletions(-) diff --git a/sssd_test_framework/roles/ad.py b/sssd_test_framework/roles/ad.py index 0803653f..ebd30120 100644 --- a/sssd_test_framework/roles/ad.py +++ b/sssd_test_framework/roles/ad.py @@ -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 """ @@ -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 """ @@ -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): diff --git a/sssd_test_framework/roles/generic.py b/sssd_test_framework/roles/generic.py index 817596cb..b1892f63 100644 --- a/sssd_test_framework/roles/generic.py +++ b/sssd_test_framework/roles/generic.py @@ -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 """ @@ -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 """ @@ -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 """ @@ -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 """ diff --git a/sssd_test_framework/roles/ipa.py b/sssd_test_framework/roles/ipa.py index 59b5d4dc..e63f0bbe 100644 --- a/sssd_test_framework/roles/ipa.py +++ b/sssd_test_framework/roles/ipa.py @@ -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 """ @@ -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 """ @@ -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 = [] @@ -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 @@ -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 @@ -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 = [] @@ -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: diff --git a/sssd_test_framework/roles/keycloak.py b/sssd_test_framework/roles/keycloak.py index 262797ac..81f4e8a0 100644 --- a/sssd_test_framework/roles/keycloak.py +++ b/sssd_test_framework/roles/keycloak.py @@ -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 """ @@ -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 """ diff --git a/sssd_test_framework/roles/samba.py b/sssd_test_framework/roles/samba.py index 0dd986b9..4333e366 100644 --- a/sssd_test_framework/roles/samba.py +++ b/sssd_test_framework/roles/samba.py @@ -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 """ @@ -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 """