Skip to content

Commit aa89eb9

Browse files
committed
Removed colors_list from call sig
1 parent 53f44be commit aa89eb9

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

Diff for: plotly/colors.py

+5-11
Original file line numberDiff line numberDiff line change
@@ -176,18 +176,14 @@ def color_parser(colors, function):
176176
return new_color_list
177177

178178

179-
def validate_colors(colors, colors_list=None):
179+
def validate_colors(colors):
180180
"""
181181
Validates color(s) and returns an error for invalid color(s)
182182
183183
:param (str|tuple|list) colors: either a plotly scale name, an rgb or hex
184184
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
188185
"""
189-
if colors_list is None:
190-
colors_list = []
186+
colors_list = []
191187

192188
# if colors is a single color, put into colors_list
193189
if isinstance(colors, str):
@@ -240,8 +236,7 @@ def validate_colors(colors, colors_list=None):
240236

241237
def convert_colors_to_same_type(colors, colortype='rgb', scale=None,
242238
return_default_colors=False,
243-
num_of_defualt_colors=2,
244-
colors_list=None):
239+
num_of_defualt_colors=2):
245240
"""
246241
Converts color(s) to the specified color type
247242
@@ -255,14 +250,13 @@ def convert_colors_to_same_type(colors, colortype='rgb', scale=None,
255250
256251
:param (str|tuple|list) colors: either a plotly scale name, an rgb or hex
257252
color, a color tuple or a list/tuple of colors
258-
:param (list) colors_list: see docs for validate_colors()
259253
:param (list) scale: see docs for validate_scale_values()
260254
261255
:rtype (tuple) (colors_list, scale) if scale is None in the function call,
262256
then scale will remain None in the returned tuple
263257
"""
264-
if colors_list is None:
265-
colors_list = []
258+
#if colors_list is None:
259+
colors_list = []
266260

267261
if colors is None and return_default_colors is True:
268262
colors_list = DEFAULT_PLOTLY_COLORS[0:num_of_defualt_colors]

0 commit comments

Comments
 (0)