Apply Black Python linter to mac.pslist plugin

Applied the Black Python linter to the mac PsList plugin, resulting in more readable and consistent code formatting.
This commit is contained in:
cpuu
2023-05-10 10:07:09 +09:00
parent 186b1ed1c2
commit 396daa528c
+14 -4
View File
@@ -114,11 +114,12 @@ class PsList(interfaces.plugins.PluginInterface):
gid = task.p_gid
start_time_seconds = task.p_start.tv_sec
start_time_microseconds = task.p_start.tv_usec
start_time = datetime.datetime.fromtimestamp(start_time_seconds + start_time_microseconds / 1e6)
start_time = datetime.datetime.fromtimestamp(
start_time_seconds + start_time_microseconds / 1e6
)
ppid = task.p_ppid
yield (0, (offset, name, pid, uid, gid, start_time, ppid))
@classmethod
@@ -321,5 +322,14 @@ class PsList(interfaces.plugins.PluginInterface):
def run(self):
return renderers.TreeGrid(
[("OFFSET", format_hints.Hex), ("NAME", str), ("PID", int), ("UID", int), ("GID", int), ("Start Time", datetime.datetime), ("PPID", int)], self._generator()
[
("OFFSET", format_hints.Hex),
("NAME", str),
("PID", int),
("UID", int),
("GID", int),
("Start Time", datetime.datetime),
("PPID", int),
],
self._generator(),
)