From: Yannic Moog Date: Tue, 15 Jul 2025 06:21:24 +0000 (+0200) Subject: binman: Fix typing for python >= 3.7 X-Git-Tag: v2025.10-rc1~38 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=187ac12927c042a982961096c9a418287b8e97e2;p=thirdparty%2Fu-boot.git binman: Fix typing for python >= 3.7 To get the [] annotation working with python 3.7 and 3.8, import annotations. Reported-by: Tim Harvey Fixes: 21bc3433a43d ("binman: rework dropping absent entries from packaged image") Reviewed-by: Bryan Brattlof Signed-off-by: Yannic Moog Tested-by: Tim Harvey --- diff --git a/tools/binman/etype/cbfs.py b/tools/binman/etype/cbfs.py index 5879f377231..9cc4b756b3f 100644 --- a/tools/binman/etype/cbfs.py +++ b/tools/binman/etype/cbfs.py @@ -5,6 +5,7 @@ # Entry-type module for a Coreboot Filesystem (CBFS) # +from __future__ import annotations from collections import OrderedDict from binman import cbfs_util diff --git a/tools/binman/etype/mkimage.py b/tools/binman/etype/mkimage.py index 75e59c3d3a3..9fba902bdad 100644 --- a/tools/binman/etype/mkimage.py +++ b/tools/binman/etype/mkimage.py @@ -5,6 +5,7 @@ # Entry-type module for producing an image using mkimage # +from __future__ import annotations from collections import OrderedDict from binman.entry import Entry diff --git a/tools/binman/etype/section.py b/tools/binman/etype/section.py index 03c4f7c6ec7..6a26d687056 100644 --- a/tools/binman/etype/section.py +++ b/tools/binman/etype/section.py @@ -8,6 +8,7 @@ Sections are entries which can contain other entries. This allows hierarchical images to be created. """ +from __future__ import annotations from collections import OrderedDict import concurrent.futures import re