Changeset - 0dd05e9d4ae7
[Not reviewed]
default
0 1 0
drewp@bigasterisk.com - 20 months ago 2023-05-24 06:43:07
drewp@bigasterisk.com
ran into this line- maybe it is not NotImplemented after all?
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
light9/effect/settings.py
Show inline comments
 
@@ -87,25 +87,25 @@ class _Settings:
 
        """note that others may have multiple values for an attr"""
 
        self = cls(graph, [])
 
        for s in others:
 
            # if not isinstance(s, cls):
 
            #     raise TypeError(s)
 
            for row in s.asList():  # could work straight from s._compiled
 
                if row[0] is None:
 
                    raise TypeError('bad row %r' % (row,))
 
                dev, devAttr, value = row
 
                devDict = self._compiled.setdefault(dev, {})
 
                if devAttr in devDict:
 
                    existingVal: VTUnion = devDict[devAttr]
 
                    raise NotImplementedError('fixme: dev is to be a deviceclass (but it is currently unused)')
 
                    # raise NotImplementedError('fixme: dev is to be a deviceclass (but it is currently unused)')
 
                    value = resolve(dev, devAttr, [existingVal, value])
 
                devDict[devAttr] = value
 
        self._delZeros()
 
        return self
 

	
 
    @classmethod
 
    def _mult(cls, weight, row, dd) -> VTUnion:
 
        if isinstance(row[2], str):
 
            prev = parseHexNorm(dd.get(row[1], '#000000'))
 
            return toHex(prev + weight * numpy.array(parseHexNorm(row[2])))
 
        else:
 
            return dd.get(row[1], 0) + weight * row[2]
0 comments (0 inline, 0 general)