Skip to content

Commit

Permalink
init, ldap, and tests reformatting for black
Browse files Browse the repository at this point in the history
Fixing some spacing and line length issues caught by tox running black.
  • Loading branch information
spoore1 authored and justin-stephenson committed Jan 31, 2024
1 parent 6b780cb commit a7cf9bb
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 27 deletions.
1 change: 1 addition & 0 deletions sssd_test_framework/hosts/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
"""SSSD multihost hosts."""

from __future__ import annotations
1 change: 1 addition & 0 deletions sssd_test_framework/misc/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Miscellaneous functions."""

from __future__ import annotations

import itertools
Expand Down
1 change: 1 addition & 0 deletions sssd_test_framework/roles/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
"""SSSD multihost roles."""

from __future__ import annotations
57 changes: 30 additions & 27 deletions sssd_test_framework/roles/ldap.py
Original file line number Diff line number Diff line change
Expand Up @@ -1200,12 +1200,9 @@ def add(
host: str | list[str] | None = None,
command: str | list[str] | None = None,
option: str | list[str] | None = None,
runasuser: int
| str
| LDAPUserType
| LDAPGroupType
| list[int | str | LDAPUserType | LDAPGroupType]
| None = None,
runasuser: (
int | str | LDAPUserType | LDAPGroupType | list[int | str | LDAPUserType | LDAPGroupType] | None
) = None,
runasgroup: int | str | LDAPGroupType | list[int | str | LDAPGroupType] | None = None,
notbefore: str | list[str] | None = None,
notafter: str | list[str] | None = None,
Expand Down Expand Up @@ -1264,23 +1261,27 @@ def add(
def modify(
self,
*,
user: int
| str
| LDAPUserType
| LDAPGroupType
| list[int | str | LDAPUserType | LDAPGroupType]
| DeleteAttribute
| None = None,
user: (
int
| str
| LDAPUserType
| LDAPGroupType
| list[int | str | LDAPUserType | LDAPGroupType]
| DeleteAttribute
| None
) = None,
host: str | list[str] | DeleteAttribute | None = None,
command: str | list[str] | DeleteAttribute | None = None,
option: str | list[str] | DeleteAttribute | None = None,
runasuser: int
| str
| LDAPUserType
| LDAPGroupType
| list[int | str | LDAPUserType | LDAPGroupType]
| DeleteAttribute
| None = None,
runasuser: (
int
| str
| LDAPUserType
| LDAPGroupType
| list[int | str | LDAPUserType | LDAPGroupType]
| DeleteAttribute
| None
) = None,
runasgroup: int | str | LDAPGroupType | list[int | str | LDAPGroupType] | DeleteAttribute | None = None,
notbefore: str | list[str] | DeleteAttribute | None = None,
notafter: str | list[str] | DeleteAttribute | None = None,
Expand Down Expand Up @@ -1341,13 +1342,15 @@ def modify(

def __sudo_user(
self,
sudo_user: None
| DeleteAttribute
| int
| str
| LDAPUserType
| LDAPGroupType
| list[int | str | LDAPUserType | LDAPGroupType],
sudo_user: (
None
| DeleteAttribute
| int
| str
| LDAPUserType
| LDAPGroupType
| list[int | str | LDAPUserType | LDAPGroupType]
),
) -> list[str] | DeleteAttribute | None:
def _get_value(value: int | str | LDAPUserType | LDAPGroupType):
if isinstance(value, self.user_cls):
Expand Down
1 change: 1 addition & 0 deletions sssd_test_framework/utils/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
"""SSSD multihost utils used by roles."""

from __future__ import annotations
1 change: 1 addition & 0 deletions tests/test_misc.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Miscellaneous functions."""

from __future__ import annotations

import textwrap
Expand Down

0 comments on commit a7cf9bb

Please sign in to comment.