File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Filter options
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Original file line number Diff line number Diff line change 43
43
'sharing' : six .string_types
44
44
}
45
45
46
+ SHARING_OPTIONS = ['public' , 'private' , 'secret' ]
47
+
46
48
47
49
def sign_in (username , api_key , ** kwargs ):
48
50
"""
@@ -118,11 +120,10 @@ def update_session_plot_options(**kwargs):
118
120
.format (key , PLOT_OPTIONS [key ]))
119
121
120
122
# raise exception if sharing is invalid
121
- if (key == 'sharing' and not (kwargs [key ] in
122
- ['public' , 'private' , 'secret' ])):
123
- raise exceptions .PlotlyError ("'{}' must be of either {}"
124
- .format (key , "'public', 'private'" +
125
- " or 'secret'" ))
123
+ if (key == 'sharing' and not (kwargs [key ] in SHARING_OPTIONS )):
124
+ raise exceptions .PlotlyError ("'{0}' must be of either '{1}', '{2}'"
125
+ " or '{3}'"
126
+ .format (key , * SHARING_OPTIONS ))
126
127
127
128
# update local _session dict with new plot options
128
129
_session ['plot_options' ].update (kwargs )
You can’t perform that action at this time.
0 commit comments