@@ -124,9 +124,7 @@ def __init__(
124124 if alpha != 1.0 :
125125 data [:, - 1 ] = alpha
126126
127- super (ColorFeature , self ).__init__ (
128- parent , data , collection_index = collection_index
129- )
127+ super ().__init__ (parent , data , collection_index = collection_index )
130128
131129 def __setitem__ (self , key , value ):
132130 # parse numerical slice indices
@@ -253,6 +251,7 @@ class CmapFeature(ColorFeature):
253251 """
254252
255253 def __init__ (self , parent , colors , cmap_name : str , cmap_values : np .ndarray ):
254+ # Skip the ColorFeature's __init__
256255 super (ColorFeature , self ).__init__ (parent , colors )
257256
258257 self ._cmap_name = cmap_name
@@ -278,7 +277,7 @@ def __setitem__(self, key, cmap_name):
278277 )
279278
280279 self ._cmap_name = cmap_name
281- super (CmapFeature , self ).__setitem__ (key , colors )
280+ super ().__setitem__ (key , colors )
282281
283282 @property
284283 def name (self ) -> str :
@@ -299,7 +298,7 @@ def values(self, values: np.ndarray):
299298
300299 self ._cmap_values = values
301300
302- super (CmapFeature , self ).__setitem__ (slice (None ), colors )
301+ super ().__setitem__ (slice (None ), colors )
303302
304303 def __repr__ (self ) -> str :
305304 s = f"CmapFeature for { self ._parent } , to get name or values: `<graphic>.cmap.name`, `<graphic>.cmap.values`"
@@ -330,7 +329,7 @@ class ImageCmapFeature(GraphicFeature):
330329
331330 def __init__ (self , parent , cmap : str ):
332331 cmap_texture_view = get_cmap_texture (cmap )
333- super (ImageCmapFeature , self ).__init__ (parent , cmap_texture_view )
332+ super ().__init__ (parent , cmap_texture_view )
334333 self ._name = cmap
335334
336335 def _set (self , cmap_name : str ):
0 commit comments