From: Iker Pedrosa Date: Tue, 23 Dec 2025 09:26:33 +0000 (+0100) Subject: tests/system/framework/utils/tools.py: fix GShadowEntry X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ce9e598fac3a130c5578b8e13d69707f42d7d359;p=thirdparty%2Fshadow.git tests/system/framework/utils/tools.py: fix GShadowEntry GShadowEntry administrators and members represent a list of usernames, not a single string. Thus, set them to `list[str]`. This fixes type safety and clarifies the expected data structure. Fixes: 458700b5d670 (2025-09-10; "tests/system/framework/: fix Python linter issues") Signed-off-by: Iker Pedrosa --- diff --git a/tests/system/framework/utils/tools.py b/tests/system/framework/utils/tools.py index a2c85cba4..03a79219a 100644 --- a/tests/system/framework/utils/tools.py +++ b/tests/system/framework/utils/tools.py @@ -388,8 +388,8 @@ class GShadowEntry(object): self, name: str | None, password: str | None, - administrators: str | None, - members: str | None, + administrators: list[str], + members: list[str], ) -> None: self.name: str | None = name """ @@ -401,18 +401,18 @@ class GShadowEntry(object): Group password. """ - self.administrators: str | None = administrators + self.administrators: list[str] = administrators """ Group administrators. """ - self.members: str | None = members + self.members: list[str] = members """ Group members. """ def __str__(self) -> str: - return f"({self.name}:{self.password}:{self.administrators}:" f"{self.members})" + return f"({self.name}:{self.password}:" f"{self.administrators}:" f"{self.members})" def __repr__(self) -> str: return str(self) @@ -422,7 +422,7 @@ class GShadowEntry(object): return cls( name=d.get("group_name", None), password=d.get("password", None), - administrators=d.get("administrators", None), + administrators=d.get("administrators", []), members=d.get("members", []), )