Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3b8cc1f

Browse files
committed
Vernacular, better yet.
1 parent 29476b1 commit 3b8cc1f

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

plotly/exceptions.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ def __init__(self, obj='', key='', **kwargs):
7979
"'help(plotly.graph_objs.{obj_name})' for more information."
8080
"".format(key=key, obj_name=obj.__class__.__name__)
8181
)
82-
plain_message="invalid key, '{}', for '{}' object" \
83-
"".format(key, obj.__class__.__name__)
82+
plain_message = ("Invalid key, '{key}', found in '{obj}' object"
83+
"".format(key=key, obj=obj.__class__.__name__))
8484
super(PlotlyDictKeyError, self).__init__(message=message,
8585
path=[key],
8686
plain_message=plain_message,
@@ -98,8 +98,8 @@ def __init__(self, obj='', key='', value='', val_types='', **kwargs):
9898
val_types=val_types,
9999
obj_name=obj.__class__.__name__)
100100
)
101-
plain_message = ("invalid value associated with key, '{}', for "
102-
"'{}' object".format(key, obj.__class__.__name__))
101+
plain_message = ("Invalid value found in '{obj}' associated with key, "
102+
"'{key}'".format(key=key, obj=obj.__class__.__name__))
103103
super(PlotlyDictValueError, self).__init__(message=message,
104104
plain_message=plain_message,
105105
path=[key],
@@ -113,8 +113,8 @@ def __init__(self, obj='', index='', entry='', **kwargs):
113113
"".format(index, obj.__class__.__name__)
114114
)
115115
plain_message = (
116-
"The entry at index, '{}', in '{}' object is invalid."
117-
"".format(index, obj.__class__.__name__)
116+
"Invalid entry found in '{obj}' object at index, '{index}'."
117+
"".format(obj=obj.__class__.__name__, index=index)
118118
)
119119
super(PlotlyListEntryError, self).__init__(message=message,
120120
plain_message=plain_message,
@@ -130,9 +130,9 @@ def __init__(self, obj='', index='', **kwargs):
130130
"'{}' lists.".format(index, obj.__class__.__name__)
131131
)
132132
plain_message = (
133-
"The 'data' entry at index, '{}', is invalid because it does "
134-
"not contain a valid 'type' key. This is required for "
135-
"valid 'data' lists.".format(index))
133+
"Invalid entry found in 'data' object at index, '{}'. It does "
134+
"not contain a valid 'type' key, required for 'data' lists."
135+
"".format(index))
136136
super(PlotlyDataTypeError, self).__init__(message=message,
137137
plain_message=plain_message,
138138
path=[index],

0 commit comments

Comments
 (0)