Skip to content

Commit

Permalink
black format
Browse files Browse the repository at this point in the history
  • Loading branch information
ofaurax committed Nov 4, 2024
1 parent 90cdffd commit 21385ab
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions packethardware/component/disk.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,23 @@ def __init__(self, lsblk):
"rota": (
self.lsblk["rota"]
if isinstance(self.lsblk["rota"], str)
else "1" if self.lsblk["rota"] else "0"
else "1"
if self.lsblk["rota"]
else "0"
),
"tool": self.lsblk["tool"],
}
self.lsblk["rota"] = self.data["rota"]
self.lsblk["size"] = self.data["size"]
if "children" in self.lsblk:
for c in self.lsblk["children"]:
c["rota"] = c["rota"] if isinstance(c["rota"], str) else "1" if c["rota"] else "0"
c["rota"] = (
c["rota"]
if isinstance(c["rota"], str)
else "1"
if c["rota"]
else "0"
)
c["size"] = str(c["size"])

if self.__is_nvme():
Expand Down

0 comments on commit 21385ab

Please sign in to comment.