@@ -156,8 +156,7 @@ def convert_value(value):
156156 if query is not None :
157157 if params is not None :
158158 params = {
159- key : convert_value (value )
160- for key , value in params .items ()
159+ key : convert_value (value ) for key , value in params .items ()
161160 }
162161 data = json .dumps ({
163162 'query' : query ,
@@ -358,18 +357,18 @@ def upload_data(self,
358357
359358 request_data = {
360359 "operations" :
361- json .dumps ({
362- "variables" : {
363- "file" : None ,
364- "contentLength" : len (content ),
365- "sign" : sign
366- },
367- "query" :
368- """mutation UploadFile($file: Upload!, $contentLength: Int!,
360+ json .dumps ({
361+ "variables" : {
362+ "file" : None ,
363+ "contentLength" : len (content ),
364+ "sign" : sign
365+ },
366+ "query" :
367+ """mutation UploadFile($file: Upload!, $contentLength: Int!,
369368 $sign: Boolean) {
370369 uploadFile(file: $file, contentLength: $contentLength,
371370 sign: $sign) {url filename} } """ ,
372- }),
371+ }),
373372 "map" : (None , json .dumps ({"1" : ["variables.file" ]})),
374373 }
375374 response = requests .post (
@@ -378,7 +377,7 @@ def upload_data(self,
378377 data = request_data ,
379378 files = {
380379 "1" : (filename , content , content_type ) if
381- (filename and content_type ) else content
380+ (filename and content_type ) else content
382381 })
383382
384383 if response .status_code == 502 :
@@ -666,8 +665,7 @@ def create_project(self, **kwargs) -> Project:
666665 elif queue_mode == QueueMode .Dataset :
667666 logger .warning (
668667 "QueueMode.Dataset will eventually be deprecated, and is no longer "
669- "recommended for new projects. Prefer QueueMode.Batch instead."
670- )
668+ "recommended for new projects. Prefer QueueMode.Batch instead." )
671669
672670 return self ._create (Entity .Project , {
673671 ** kwargs ,
@@ -779,7 +777,7 @@ def get_data_row_ids_for_external_ids(
779777 for row in self .execute (
780778 query_str ,
781779 {'externalId_in' : external_ids [i :i + max_ids_per_request ]
782- })['externalIdsToDataRowIds' ]:
780+ })['externalIdsToDataRowIds' ]:
783781 result [row ['externalId' ]].append (row ['dataRowId' ])
784782 return result
785783
@@ -1071,10 +1069,9 @@ def _format_failed_rows(rows: Dict[str, str],
10711069 }
10721070 """
10731071 params = {
1074- 'globalKeyDataRowLinks' :
1075- [{utils .camel_case (key ): value
1076- for key , value in input .items ()}
1077- for input in global_key_to_data_row_inputs ]
1072+ 'globalKeyDataRowLinks' : [{
1073+ utils .camel_case (key ): value for key , value in input .items ()
1074+ } for input in global_key_to_data_row_inputs ]
10781075 }
10791076 assign_global_keys_to_data_rows_job = self .execute (query_str , params )
10801077
@@ -1103,8 +1100,8 @@ def _format_failed_rows(rows: Dict[str, str],
11031100 """
11041101 result_params = {
11051102 "jobId" :
1106- assign_global_keys_to_data_rows_job ["assignGlobalKeysToDataRows" ]
1107- ["jobId" ]
1103+ assign_global_keys_to_data_rows_job ["assignGlobalKeysToDataRows"
1104+ ] ["jobId" ]
11081105 }
11091106
11101107 # Poll job status until finished, then retrieve results
@@ -1220,7 +1217,7 @@ def _format_failed_rows(rows: List[str],
12201217 """
12211218 result_params = {
12221219 "jobId" :
1223- data_rows_for_global_keys_job ["dataRowsForGlobalKeys" ]["jobId" ]
1220+ data_rows_for_global_keys_job ["dataRowsForGlobalKeys" ]["jobId" ]
12241221 }
12251222
12261223 # Poll job status until finished, then retrieve results
@@ -1342,8 +1339,7 @@ def _format_failed_rows(rows: List[str],
13421339 errors .extend (
13431340 _format_failed_rows (
13441341 data ['notFoundGlobalKeys' ],
1345- "Failed to find data row matching provided global key" )
1346- )
1342+ "Failed to find data row matching provided global key" ))
13471343 errors .extend (
13481344 _format_failed_rows (
13491345 data ['accessDeniedGlobalKeys' ],
0 commit comments