@@ -77,8 +77,9 @@ def get_pci_ids(device_id: str, vendor_id: str = ""):
77
77
(e.g., ['0000:00:01.0', '0000:00:02.0']).
78
78
"""
79
79
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 ()
82
83
return [v .split (" " )[0 ] for v in devices ]
83
84
84
85
@@ -252,8 +253,9 @@ def __init__(self, debugfs_path: pathlib.Path):
252
253
for fname in files :
253
254
self .__setitem__ (f"{ fname .name } " , {})
254
255
255
- self .__setitem__ ("telemetry" ,
256
- QatDeviceTelemetry (self .path / "telemetry" ))
256
+ self .__setitem__ (
257
+ "telemetry" , QatDeviceTelemetry (self .path / "telemetry" )
258
+ )
257
259
self .get ("telemetry" ).enable_telemetry ()
258
260
259
261
self .__setitem__ ("dev_cfg" , self .read ("dev_cfg" ))
@@ -430,12 +432,16 @@ def __init__(self, filter_devs=[]):
430
432
# available in the sysfs and debugfs. for
431
433
# example, it has been passthrough in a VM,
432
434
# 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
+
434
438
pass
435
439
self .qat_devs .extend (_devs )
436
440
437
441
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
439
445
return False
440
446
return True
441
447
@@ -565,6 +571,7 @@ def qatctl(opts, p):
565
571
"dc;sym" ,
566
572
]
567
573
574
+
568
575
def build_parser ():
569
576
parser = argparse .ArgumentParser (description = "QAT control utility" )
570
577
parser .add_argument (
@@ -601,7 +608,7 @@ def build_parser():
601
608
help = "get device telemetry data" ,
602
609
)
603
610
parser .add_argument_group ("list group" )
604
- subparser = parser .add_subparsers (dest = ' command' )
611
+ subparser = parser .add_subparsers (dest = " command" )
605
612
parser_list_dev = subparser .add_parser ("list" )
606
613
parser_list_dev .add_argument (
607
614
"--short" ,
0 commit comments