From 187ac12927c042a982961096c9a418287b8e97e2 Mon Sep 17 00:00:00 2001 From: Yannic Moog Date: Tue, 15 Jul 2025 08:21:24 +0200 Subject: [PATCH] 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 --- tools/binman/etype/cbfs.py | 1 + tools/binman/etype/mkimage.py | 1 + tools/binman/etype/section.py | 1 + 3 files changed, 3 insertions(+) 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 -- 2.47.2