Skip to content

Commit 3e4b307

Browse files
committed
run black
1 parent c0c6eef commit 3e4b307

File tree

2 files changed

+152
-73
lines changed

2 files changed

+152
-73
lines changed

providers/base/bin/qatctl.py

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,9 @@ def get_pci_ids(device_id: str, vendor_id: str = ""):
7777
(e.g., ['0000:00:01.0', '0000:00:02.0']).
7878
"""
7979
args: List[str] = ["lspci", "-d", f"{vendor_id}:{device_id}"]
80-
devices = subprocess.check_output(args, universal_newlines=True) \
81-
.splitlines()
80+
devices = subprocess.check_output(
81+
args, universal_newlines=True
82+
).splitlines()
8283
return [v.split(" ")[0] for v in devices]
8384

8485

@@ -252,8 +253,9 @@ def __init__(self, debugfs_path: pathlib.Path):
252253
for fname in files:
253254
self.__setitem__(f"{fname.name}", {})
254255

255-
self.__setitem__("telemetry",
256-
QatDeviceTelemetry(self.path / "telemetry"))
256+
self.__setitem__(
257+
"telemetry", QatDeviceTelemetry(self.path / "telemetry")
258+
)
257259
self.get("telemetry").enable_telemetry()
258260

259261
self.__setitem__("dev_cfg", self.read("dev_cfg"))
@@ -430,12 +432,16 @@ def __init__(self, filter_devs=[]):
430432
# available in the sysfs and debugfs. for
431433
# example, it has been passthrough in a VM,
432434
# we do not want to crash
433-
print(f"Exception occured to instanciate QAT device : {e}") # noqa: E501
435+
print(
436+
f"Exception occured to instanciate QAT dev : {e}"
437+
434438
pass
435439
self.qat_devs.extend(_devs)
436440

437441
def filter_counter(counter_name):
438-
if QatDevManager.counters and (counter_name not in QatDevManager.counters): # noqa: E501
442+
if QatDevManager.counters and (
443+
counter_name not in QatDevManager.counters
444+
): # noqa: E501
439445
return False
440446
return True
441447

@@ -565,6 +571,7 @@ def qatctl(opts, p):
565571
"dc;sym",
566572
]
567573

574+
568575
def build_parser():
569576
parser = argparse.ArgumentParser(description="QAT control utility")
570577
parser.add_argument(
@@ -601,7 +608,7 @@ def build_parser():
601608
help="get device telemetry data",
602609
)
603610
parser.add_argument_group("list group")
604-
subparser = parser.add_subparsers(dest='command')
611+
subparser = parser.add_subparsers(dest="command")
605612
parser_list_dev = subparser.add_parser("list")
606613
parser_list_dev.add_argument(
607614
"--short",

0 commit comments

Comments
 (0)