We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2375eec commit b8e776fCopy full SHA for b8e776f
pyinfra/facts/server.py
@@ -506,7 +506,20 @@ def process(self, output):
506
return crons
507
508
509
-class Users(FactBase):
+class UserInfo(TypedDict):
510
+ name: str
511
+ comment: str
512
+ home: str
513
+ shell: str
514
+ group: str
515
+ groups: list[str]
516
+ uid: int
517
+ gid: int
518
+ lastlog: str
519
+ password: str
520
+
521
522
+class Users(FactBase[dict[str, UserInfo]]):
523
"""
524
Returns a dictionary of users -> details.
525
@@ -543,7 +556,7 @@ def command(self) -> str:
543
556
544
557
default = dict
545
558
546
- def process(self, output):
559
+ def process(self, output: Iterable[str]) -> dict[str, UserInfo]:
547
560
users = {}
548
561
rex = r"[A-Z][a-z]{2} [A-Z][a-z]{2} {1,2}\d+ .+$"
549
562
0 commit comments