@@ -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
0 commit comments