Repository: plotly/plotly.py

Issue:
Documentation misspells
I was consulting the Plotly Python documentation and I ran into some misspells : `dictioanry` instead `dictionary`.

- [380](https://github.com/plotly/plotly.py/blob/03979d105c65dda3df3a155322eaff18f203b03f/packages/python/plotly/_plotly_utils/colors/__init__.py#L380),
- [500](https://github.com/plotly/plotly.py/blob/03979d105c65dda3df3a155322eaff18f203b03f/packages/python/plotly/_plotly_utils/colors/__init__.py#L500),
- [502](https://github.com/plotly/plotly.py/blob/03979d105c65dda3df3a155322eaff18f203b03f/packages/python/plotly/_plotly_utils/colors/__init__.py#L502).



Discussion:
Thanks for letting us know! We'd be happy to accept a pull request to fix these :)
I fixed [this issue](https://github.com/plotly/plotly.py/blob/03979d105c65dda3df3a155322eaff18f203b03f/packages/python/plotly/_plotly_utils/colors/__init__.py#L419) (with other misspells) but before PR, on which branch to PR for the v5 bump ?

Resolving patch:
diff --git a/packages/python/plotly/_plotly_utils/colors/__init__.py b/packages/python/plotly/_plotly_utils/colors/__init__.py
--- a/packages/python/plotly/_plotly_utils/colors/__init__.py
+++ b/packages/python/plotly/_plotly_utils/colors/__init__.py
@@ -377,7 +377,7 @@ def validate_colors(colors, colortype="tuple"):
 
 def validate_colors_dict(colors, colortype="tuple"):
     """
-    Validates dictioanry of color(s)
+    Validates dictionary of color(s)
     """
     # validate each color element in the dictionary
     for key in colors:
@@ -491,15 +491,15 @@ def convert_colors_to_same_type(
         return (colors_list, scale)
     else:
         raise exceptions.PlotlyError(
-            "You must select either rgb or tuple " "for your colortype variable."
+            "You must select either rgb or tuple for your colortype variable."
         )
 
 
 def convert_dict_colors_to_same_type(colors_dict, colortype="rgb"):
     """
-    Converts a colors in a dictioanry of colors to the specified color type
+    Converts a colors in a dictionary of colors to the specified color type
 
-    :param (dict) colors_dict: a dictioanry whose values are single colors
+    :param (dict) colors_dict: a dictionary whose values are single colors
     """
     for key in colors_dict:
         if "#" in colors_dict[key]:
@@ -519,7 +519,7 @@ def convert_dict_colors_to_same_type(colors_dict, colortype="rgb"):
         return colors_dict
     else:
         raise exceptions.PlotlyError(
-            "You must select either rgb or tuple " "for your colortype variable."
+            "You must select either rgb or tuple for your colortype variable."
         )
 
 
@@ -536,7 +536,7 @@ def validate_scale_values(scale):
     """
     if len(scale) < 2:
         raise exceptions.PlotlyError(
-            "You must input a list of scale values " "that has at least two values."
+            "You must input a list of scale values that has at least two values."
         )
 
     if (scale[0] != 0) or (scale[-1] != 1):
@@ -584,7 +584,7 @@ def make_colorscale(colors, scale=None):
     # validate minimum colors length of 2
     if len(colors) < 2:
         raise exceptions.PlotlyError(
-            "You must input a list of colors that " "has at least two colors."
+            "You must input a list of colors that has at least two colors."
         )
 
     if scale is None:
@@ -594,7 +594,7 @@ def make_colorscale(colors, scale=None):
     else:
         if len(colors) != len(scale):
             raise exceptions.PlotlyError(
-                "The length of colors and scale " "must be the same."
+                "The length of colors and scale must be the same."
             )
 
         validate_scale_values(scale)
diff --git a/packages/python/plotly/plotly/figure_factory/_gantt.py b/packages/python/plotly/plotly/figure_factory/_gantt.py
--- a/packages/python/plotly/plotly/figure_factory/_gantt.py
+++ b/packages/python/plotly/plotly/figure_factory/_gantt.py
@@ -973,7 +973,7 @@ def create_gantt(
             raise exceptions.PlotlyError(
                 "Error. You have set colors to a dictionary but have not "
                 "picked an index. An index is required if you are "
-                "assigning colors to particular values in a dictioanry."
+                "assigning colors to particular values in a dictionary."
             )
         fig = gantt(
             chart,
diff --git a/packages/python/plotly/plotly/figure_factory/_violin.py b/packages/python/plotly/plotly/figure_factory/_violin.py
--- a/packages/python/plotly/plotly/figure_factory/_violin.py
+++ b/packages/python/plotly/plotly/figure_factory/_violin.py
@@ -475,7 +475,7 @@ def create_violin(
         of param colors. This means colors must be a list with at least 2
         colors in it (Plotly colorscales are accepted since they map to a
         list of two rgb colors). Default = False
-    :param (dict) group_stats: a dictioanry where each key is a unique
+    :param (dict) group_stats: a dictionary where each key is a unique
         value from the group_header column in data. Each value must be a
         number and will be used to color the violin plots if a colorscale
         is being used.


Test patch:
diff --git a/packages/python/plotly/plotly/tests/test_optional/optional_utils.py b/packages/python/plotly/plotly/tests/test_optional/optional_utils.py
--- a/packages/python/plotly/plotly/tests/test_optional/optional_utils.py
+++ b/packages/python/plotly/plotly/tests/test_optional/optional_utils.py
@@ -37,7 +37,7 @@ def assert_fig_equal(self, d1, d2, msg=None, ignore=["uid"]):
         """
         Helper function for assert_dict_equal
 
-        By defualt removes uid from d1 and/or d2 if present
+        By default removes uid from d1 and/or d2 if present
         then calls assert_dict_equal.
 
         :param (list|tuple) ignore: sequence of key names as
diff --git a/packages/python/plotly/plotly/tests/test_optional/test_tools/test_figure_factory.py b/packages/python/plotly/plotly/tests/test_optional/test_tools/test_figure_factory.py
--- a/packages/python/plotly/plotly/tests/test_optional/test_tools/test_figure_factory.py
+++ b/packages/python/plotly/plotly/tests/test_optional/test_tools/test_figure_factory.py
@@ -1718,7 +1718,7 @@ def test_gantt_validate_colors(self):
         pattern4 = (
             "Error. You have set colors to a dictionary but have not "
             "picked an index. An index is required if you are "
-            "assigning colors to particular values in a dictioanry."
+            "assigning colors to particular values in a dictionary."
         )
 
         self.assertRaisesRegexp(