@@ -176,18 +176,14 @@ def color_parser(colors, function):
176
176
return new_color_list
177
177
178
178
179
- def validate_colors (colors , colors_list = None ):
179
+ def validate_colors (colors ):
180
180
"""
181
181
Validates color(s) and returns an error for invalid color(s)
182
182
183
183
:param (str|tuple|list) colors: either a plotly scale name, an rgb or hex
184
184
color, a color tuple or a list/tuple of colors
185
- :param (list) colors_list: whether a single color or a list/tuple of
186
- colors is inputted, all the color types are appended to colors_list
187
- so they can be easily iterated through for validation
188
185
"""
189
- if colors_list is None :
190
- colors_list = []
186
+ colors_list = []
191
187
192
188
# if colors is a single color, put into colors_list
193
189
if isinstance (colors , str ):
@@ -240,8 +236,7 @@ def validate_colors(colors, colors_list=None):
240
236
241
237
def convert_colors_to_same_type (colors , colortype = 'rgb' , scale = None ,
242
238
return_default_colors = False ,
243
- num_of_defualt_colors = 2 ,
244
- colors_list = None ):
239
+ num_of_defualt_colors = 2 ):
245
240
"""
246
241
Converts color(s) to the specified color type
247
242
@@ -255,14 +250,13 @@ def convert_colors_to_same_type(colors, colortype='rgb', scale=None,
255
250
256
251
:param (str|tuple|list) colors: either a plotly scale name, an rgb or hex
257
252
color, a color tuple or a list/tuple of colors
258
- :param (list) colors_list: see docs for validate_colors()
259
253
:param (list) scale: see docs for validate_scale_values()
260
254
261
255
:rtype (tuple) (colors_list, scale) if scale is None in the function call,
262
256
then scale will remain None in the returned tuple
263
257
"""
264
- if colors_list is None :
265
- colors_list = []
258
+ # if colors_list is None:
259
+ colors_list = []
266
260
267
261
if colors is None and return_default_colors is True :
268
262
colors_list = DEFAULT_PLOTLY_COLORS [0 :num_of_defualt_colors ]
0 commit comments