Skip to content

Commit 69ed5d0

Browse files
committed
removed all extraneous param=None in call signatures
1 parent aa89eb9 commit 69ed5d0

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

Diff for: plotly/colors.py

+8-12
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ def validate_scale_values(scale):
393393
)
394394

395395

396-
def make_colorscale(colors, scale=None, colorscale=None):
396+
def make_colorscale(colors, scale=None):
397397
"""
398398
Makes a colorscale from a list of colors and a scale
399399
@@ -406,8 +406,7 @@ def make_colorscale(colors, scale=None, colorscale=None):
406406
407407
:param (list) colors: a list of single colors
408408
"""
409-
if colorscale is None:
410-
colorscale = []
409+
colorscale = []
411410

412411
# validate minimum colors length of 2
413412
if len(colors) < 2:
@@ -459,7 +458,7 @@ def unconvert_from_RGB_255(colors):
459458
colors[2]/(255.0))
460459

461460

462-
def convert_to_RGB_255(colors, rgb_components=None):
461+
def convert_to_RGB_255(colors):
463462
"""
464463
Multiplies each element of a triplet by 255
465464
@@ -472,8 +471,7 @@ def convert_to_RGB_255(colors, rgb_components=None):
472471
:param (list) rgb_components: grabs the three R, G and B values to be
473472
returned as computed in the function
474473
"""
475-
if rgb_components is None:
476-
rgb_components = []
474+
rgb_components = []
477475

478476
for component in colors:
479477
rounded_num = decimal.Decimal(str(component*255.0)).quantize(
@@ -561,23 +559,21 @@ def hex_to_rgb(value):
561559
for i in range(0, hex_total_length, rgb_section_length))
562560

563561

564-
def colorscale_to_colors(colorscale, color_list=None):
562+
def colorscale_to_colors(colorscale):
565563
"""
566564
Extracts the colors from colorscale as a list
567565
"""
568-
if color_list is None:
569-
color_list = []
566+
color_list = []
570567
for item in colorscale:
571568
color_list.append(item[1])
572569
return color_list
573570

574571

575-
def colorscale_to_scale(colorscale, scale_list=None):
572+
def colorscale_to_scale(colorscale):
576573
"""
577574
Extracts the interpolation scale values from colorscale as a list
578575
"""
579-
if scale_list is None:
580-
scale_list = []
576+
scale_list = []
581577
for item in colorscale:
582578
scale_list.append(item[0])
583579
return scale_list

0 commit comments

Comments
 (0)