]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
dump-auxv: apply "ruff format"
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 19 Feb 2026 17:07:28 +0000 (02:07 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 17 May 2026 17:44:47 +0000 (02:44 +0900)
tools/dump-auxv.py

index 1abacda9c1fab2b63195559468c5883b38cc73df..1eb93b01251374230ceab2336fad3c88975e3aaa 100755 (executable)
@@ -85,24 +85,43 @@ AT_AUXV = {
     'AT_L3_CACHEGEOMETRY' :  47,
 
     'AT_MINSIGSTKSZ'      :  51,         # Stack needed for signal delivery
-}
-AT_AUXV_NAMES = {v:k for k,v in AT_AUXV.items()}
+}  # fmt: skip
+AT_AUXV_NAMES = {v: k for k, v in AT_AUXV.items()}
+
 
 @click.command(help=__doc__)
-@click.option('-b', '--big-endian', 'endian',
-              flag_value='>',
-              help='Input is big-endian')
-@click.option('-l', '--little-endian', 'endian',
-              flag_value='<',
-              help='Input is little-endian')
-@click.option('-3', '--32', 'field_width',
-              flag_value=32,
-              help='Input is 32-bit')
-@click.option('-6', '--64', 'field_width',
-              flag_value=64,
-              help='Input is 64-bit')
-@click.argument('file',
-                type=click.File(mode='rb'))
+@click.option(
+    '-b',
+    '--big-endian',
+    'endian',
+    flag_value='>',
+    help='Input is big-endian',
+)
+@click.option(
+    '-l',
+    '--little-endian',
+    'endian',
+    flag_value='<',
+    help='Input is little-endian',
+)
+@click.option(
+    '-3',
+    '--32',
+    'field_width',
+    flag_value=32,
+    help='Input is 32-bit',
+)
+@click.option(
+    '-6',
+    '--64',
+    'field_width',
+    flag_value=64,
+    help='Input is 64-bit',
+)
+@click.argument(
+    'file',
+    type=click.File(mode='rb'),
+)
 def dump(endian, field_width, file):
     data = file.read()
 
@@ -111,7 +130,7 @@ def dump(endian, field_width, file):
     if endian is None:
         endian = '@'
 
-    width = {32:'II', 64:'QQ'}[field_width]
+    width = {32: 'II', 64: 'QQ'}[field_width]
 
     format_str = f'{endian}{width}'
     print(f'# {format_str=}')
@@ -137,5 +156,6 @@ def dump(endian, field_width, file):
     if not seen_null:
         print('# array not terminated with AT_NULL')
 
+
 if __name__ == '__main__':
     dump()