8000 Remove `plain_message` kwarg. · latuji/plotly.py@f11cd54 · GitHub
[go: up one dir, main page]

Skip to content

Commit f11cd54

Browse files
committed
Remove plain_message kwarg.
The backend uses the `.plain_message` attr, so it stays for 🌵.
1 parent 21535dc commit f11cd54

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

plotly/exceptions.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ class PlotlyEmptyDataError(PlotlyError):
8181

8282
# Graph Objects Errors
8383
class PlotlyGraphObjectError(PlotlyError):
84-
def __init__(self, message='', path=(), notes=(), plain_message=''):
84+
def __init__(self, message='', path=(), notes=()):
8585
self.message = message
86-
self.plain_message = plain_message
86+
self.plain_message = message # for backwards compat
8787
self.path = list(path)
8888
self.notes = notes
8989
super(PlotlyGraphObjectError, self).__init__(message)
@@ -107,7 +107,7 @@ def __init__(self, obj, path, notes=()):
107107
.format(**format_dict))
108108
notes = [obj.help(return_help=True)] + list(notes)
109109
super(PlotlyDictKeyError, self).__init__(
110-
message=message, path=path, notes=notes, plain_message=message
110+
message=message, path=path, notes=notes
111111
)
112112

113113

@@ -118,7 +118,7 @@ def __init__(self, obj, path, notes=()):
118118
.format(**format_dict))
119119
notes = [obj.help(path[-1], return_help=True)] + list(notes)
120120
super(PlotlyDictValueError, self).__init__(
121-
message=message, plain_message=message, notes=notes, path=path
121+
message=message, notes=notes, path=path
122122
)
123123

124124

@@ -129,7 +129,7 @@ def __init__(self, obj, path, notes=()):
129129
.format(**format_dict))
130130
notes = [obj.help(return_help=True)] + list(notes)
131131
super(PlotlyListEntryError, self).__init__(
132-
message=message, plain_message=message, path=path, notes=notes
132+
message=message, path=path, notes=notes
133133
)
134134

135135

@@ -141,7 +141,7 @@ def __init__(self, obj, path, notes=()):
141141
note = "It's invalid because it does't contain a valid 'type' value."
142142
notes = [note] + list(notes)
143143
super(PlotlyDataTypeError, self).__init__(
144-
message=message, plain_message=message, path=path, notes=notes
144+
message=message, path=path, notes=notes
145145
)
146146

147147

0 commit comments

Comments
 (0)
0