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 <rickard.bolin@arm.com>
diff --git a/ethosu/vela/utils.py b/ethosu/vela/utils.py
index 386ba35..6a36897 100644
--- a/ethosu/vela/utils.py
+++ b/ethosu/vela/utils.py
@@ -26,7 +26,7 @@
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 @@
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