From: Daan De Meyer Date: Wed, 29 Jan 2025 13:43:06 +0000 (+0100) Subject: ukify: Fix two typing issues X-Git-Tag: v258-rc1~1435^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2d6ae4319ccecdde7a87d12cb439a892afdec943;p=thirdparty%2Fsystemd.git ukify: Fix two typing issues --- diff --git a/src/ukify/ukify.py b/src/ukify/ukify.py index 5f821297c12..091e5a45e19 100755 --- a/src/ukify/ukify.py +++ b/src/ukify/ukify.py @@ -1510,7 +1510,7 @@ def inspect_section( data = section.get_data(length=size) digest = sha256(data).hexdigest() - struct = { + struct: dict[str, Union[int, str]] = { 'size': size, 'sha256': digest, } @@ -1529,7 +1529,7 @@ def inspect_section( if opts.json == 'off': print(f'{name}:\n size: {size} bytes\n sha256: {digest}') if ttype == 'text': - text = textwrap.indent(struct['text'].rstrip(), ' ' * 4) + text = textwrap.indent(cast(str, struct['text']).rstrip(), ' ' * 4) print(f' text:\n{text}') return name, struct