Skip to content

Commit 443bb70

Browse files
committed
💄
1 parent d59be79 commit 443bb70

File tree

4 files changed

+14
-12
lines changed

4 files changed

+14
-12
lines changed

Diff for: plotly/graph_objs/graph_objs.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,10 @@
3030
from plotly.graph_objs.graph_objs_tools import (
3131
INFO, OBJ_MAP, NAME_TO_KEY, KEY_TO_NAME
3232
)
33-
from plotly.grid_objs.grid_objs import Column, Grid
33+
from plotly.grid_objs.grid_objs import Column
3434
import copy
3535
from plotly import exceptions
36+
from plotly import utils
3637
import sys
3738
if sys.version[:3] == '2.6':
3839
from ordereddict import OrderedDict

Diff for: plotly/plotly/plotly.py

+8-7
Original file line numberDiff line numberDiff line change
@@ -677,13 +677,13 @@ def _fill_in_response_column_ids(cls, request_columns,
677677
req_col.id = '{}/{}'.format(grid_id, resp_col['uid'])
678678
response_columns.remove(resp_col)
679679

680-
681680
@classmethod
682-
def upload(cls, grid, filename, world_readable=True, auto_open=True, meta=None):
681+
def upload(cls, grid, filename,
682+
world_readable=True, auto_open=True, meta=None):
683683
""" Upload a grid to your Plotly account with the specified filename.
684684
"""
685685

686-
# Made a folder path
686+
# Make a folder path
687687
if filename[-1] == '/':
688688
filename = filename[0:-1]
689689

@@ -782,7 +782,8 @@ def append_rows(cls, rows, grid=None, grid_url=None):
782782
'rows': json.dumps(rows)
783783
}
784784

785-
api_url = _api_v2.api_url('grids')+'/{grid_id}/row'.format(grid_id=grid_id)
785+
api_url = (_api_v2.api_url('grids')+
786+
'/{grid_id}/row'.format(grid_id=grid_id))
786787
res = requests.post(api_url, data=payload, headers=_api_v2.headers())
787788
_api_v2.response_handler(res)
788789

@@ -889,16 +890,16 @@ def response_handler(cls, response):
889890

890891
@classmethod
891892
def api_url(cls, resource):
892-
return '{}/v2/{}'.format(tools.get_config_file()['plotly_api_domain'],
893-
resource)
893+
return ('{}/v2/{}'.format(tools.get_config_file()['plotly_api_domain'],
894+
resource))
894895

895896
@classmethod
896897
def headers(cls):
897898
un, api_key = _get_session_username_and_key()
898899
encoded_un_key_pair = base64.b64encode('{}:{}'.format(un, api_key))
899900
return {
900901
'authorization': 'Basic ' + encoded_un_key_pair,
901-
'plotly_client_platform': 'python {}'.format(version.__version__)
902+
'plotly-client-platform': 'python {}'.format(version.__version__)
902903
}
903904

904905

Diff for: plotly/tests/test_core/test_grid/test_grid.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88

99
from nose.tools import raises
1010
from nose import with_setup
11+
from nose.plugins.attrib import attr
1112

1213
import random
1314
import string
14-
from nose.plugins.attrib import attr
1515

1616
from plotly.graph_objs import Scatter
1717
import plotly.plotly as py

Diff for: plotly/tools.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ def mpl_to_plotly(fig, resize=False, strip_style=False, verbose=False):
332332
render an mpl figure in plotly. If you need to trouble shoot, you can do
333333
this step manually by NOT running this fuction and entereing the following:
334334
335-
============================================================================
335+
===========================================================================
336336
from mplexporter import Exporter
337337
from mplexporter.renderers import PlotlyRenderer
338338
@@ -341,7 +341,7 @@ def mpl_to_plotly(fig, resize=False, strip_style=False, verbose=False):
341341
renderer = PlotlyRenderer()
342342
exporter = Exporter(renderer)
343343
exporter.run(fig)
344-
============================================================================
344+
===========================================================================
345345
346346
You can then inspect the JSON structures by accessing these:
347347
@@ -358,7 +358,7 @@ def mpl_to_plotly(fig, resize=False, strip_style=False, verbose=False):
358358
{plotly_domain}/plot
359359
360360
** Forgot your api_key? Try signing in and looking here:
361-
{plotly_domain}/api/python/getting-started
361+
{plotly_domain}/python/getting-started
362362
363363
"""
364364
if _matplotlylib_imported:

0 commit comments

Comments
 (0)