Skip to content

Commit 9ca58d3

Browse files
committed
Remove unnecessary 'global' statements
1 parent af05d1b commit 9ca58d3

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

plotly/plotly/plotly.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,30 +53,28 @@
5353

5454

5555
def sign_in(username, api_key, **kwargs):
56-
"""Set module-scoped _credentials for session. Verify with plotly."""
57-
global _credentials
56+
"""Set module-scoped _credentials for session. Optionally, set config info.
57+
"""
5858
_credentials['username'], _credentials['api_key'] = username, api_key
5959
# TODO: verify these _credentials with plotly
6060

61-
global _config
6261
_config['plotly_domain'] = kwargs.get('plotly_domain')
6362
_config['plotly_streaming_domain'] = kwargs.get('plotly_streaming_domain')
63+
# TODO: verify format of config options
6464

6565

6666
### plot options stuff ###
6767

6868
def update_plot_options(**kwargs):
6969
""" Update the module-level _plot_options
7070
"""
71-
global _plot_options
7271
_plot_options.update(kwargs)
7372

7473

7574
def get_plot_options():
7675
""" Returns a copy of the user supplied plot options.
7776
Use `update_plot_options()` to change.
7877
"""
79-
global _plot_options
8078
return copy.copy(_plot_options)
8179

8280

0 commit comments

Comments
 (0)