From 1b1049e03c46a3b95f9c1db6999589aa40baa2ed Mon Sep 17 00:00:00 2001 From: Constantin Gierczak--Galle Date: Fri, 15 Dec 2023 11:23:29 +0100 Subject: [PATCH] Thing --- pyjecteur/common.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pyjecteur/common.py b/pyjecteur/common.py index 6f92128..90ae1c9 100644 --- a/pyjecteur/common.py +++ b/pyjecteur/common.py @@ -1,4 +1,6 @@ import logging +import itertools + from colour import Color from typing import List, Callable, Optional, Union, Tuple from enum import Enum @@ -54,8 +56,7 @@ class Filling(Enum): GREATEST = 3 # Repeat the longest color streaks def widen(colors: List[Color], width: int): - L = [] - return map(L.extend, [[e] * width for e in colors]) + return list(itertools.chain.from_iterable([[e] * width for e in colors])) def blendLedBar_simple(colors: List[Color],