From 8da4f954d32b6395c93ff72123211f40f52cc136 Mon Sep 17 00:00:00 2001 From: Rickard Bolin Date: Wed, 14 Jun 2023 16:05:47 +0000 Subject: MLBEDSW-7734: Update Sized import from collections Update import of Sized from collections to collections.abc to work with Python 3.10 Change-Id: Iae281db9402331972ad13660d04523608b23614d Signed-off-by: Rickard Bolin --- ethosu/vela/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ethosu/vela/utils.py b/ethosu/vela/utils.py index 386ba354..6a368979 100644 --- a/ethosu/vela/utils.py +++ b/ethosu/vela/utils.py @@ -26,7 +26,7 @@ def progress_print( enabled: bool, message: str, progress_counter: int = -1, - progress_total: int | collections.Sized = 0, + progress_total: int | collections.abc.Sized = 0, progress_granularity: float = 0.20, ): """Print progress information. @@ -67,7 +67,7 @@ def progress_print( context_str += ": " if message else "" display_total = progress_total # If a sized collection is provided, extract its size to use as progress total - if isinstance(progress_total, collections.Sized): + if isinstance(progress_total, collections.abc.Sized): progress_total = len(progress_total) display_total = progress_total - 1 -- cgit v1.2.1