]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tools: pylint make-autosuspend-rules.py
authorFrantisek Sumsal <frantisek@sumsal.cz>
Mon, 17 Jul 2023 17:08:08 +0000 (19:08 +0200)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Thu, 10 Aug 2023 16:13:29 +0000 (18:13 +0200)
tools/make-autosuspend-rules.py

index 633b7711d14f5c7e71d2f5e83362b087938e01f8..b1b4cef1be57e29b258be109791eed6f25197c76 100755 (executable)
@@ -12,13 +12,13 @@ for entry in chromiumos.gen_autosuspend_rules.PCI_IDS:
     vendor, device = entry.split(':')
     vendor = int(vendor, 16)
     device = int(device, 16)
-    print('pci:v{:08X}d{:08X}*'.format(vendor, device))
+    print(f'pci:v{vendor:08X}d{device:08X}*')
 
 print('# usb:v<VEND>p<PROD> (4 uppercase hexadecimal digits twice)')
 for entry in chromiumos.gen_autosuspend_rules.USB_IDS:
     vendor, product = entry.split(':')
     vendor = int(vendor, 16)
     product = int(product, 16)
-    print('usb:v{:04X}p{:04X}*'.format(vendor, product))
+    print(f'usb:v{vendor:04X}p{product:04X}*')
 
 print(' ID_AUTOSUSPEND=1')