@@ -235,22 +235,31 @@ def _process_component_request(
235235 rendered_component = str (get_root_element (soup ))
236236
237237 res .update (
238- {"dom" : rendered_component , "hash" : hash ,}
238+ {
239+ "dom" : rendered_component ,
240+ "hash" : hash ,
241+ }
239242 )
240243
241244 if return_data :
242245 res .update (
243- {"return" : return_data .get_data (),}
246+ {
247+ "return" : return_data .get_data (),
248+ }
244249 )
245250
246251 if return_data .redirect :
247252 res .update (
248- {"redirect" : return_data .redirect ,}
253+ {
254+ "redirect" : return_data .redirect ,
255+ }
249256 )
250257
251258 if return_data .poll :
252259 res .update (
253- {"poll" : return_data .poll ,}
260+ {
261+ "poll" : return_data .poll ,
262+ }
254263 )
255264
256265 parent_component = component .parent
@@ -300,11 +309,11 @@ def _handle_component_request(
300309 - processing all of the component requests in the cache and returning the resulting value if
301310 it is the first component request for that particular component name + component id combination
302311 - return a `dict` saying that the request has been queued
303-
312+
304313 Args:
305314 param request: HttpRequest for the function-based view.
306315 param: component_request: Component request to process.
307-
316+
308317 Returns:
309318 `dict` with the following structure:
310319 {
@@ -331,7 +340,9 @@ def _handle_component_request(
331340 component_requests .append (component_request )
332341
333342 cache .set (
334- queue_cache_key , component_requests , timeout = get_serial_timeout (),
343+ queue_cache_key ,
344+ component_requests ,
345+ timeout = get_serial_timeout (),
335346 )
336347
337348 if len (component_requests ) > 1 :
@@ -361,7 +372,7 @@ def _handle_queued_component_requests(
361372 param: component_name: Name of the component, e.g. "hello-world".
362373 param: queue_cache_key: Cache key created from component id which should be unique
363374 for any particular user's request lifecycle.
364-
375+
365376 Returns:
366377 JSON with the following structure:
367378 {
@@ -398,7 +409,9 @@ def _handle_queued_component_requests(
398409 if component_requests :
399410 component_requests .pop (0 )
400411 cache .set (
401- queue_cache_key , component_requests , timeout = get_serial_timeout (),
412+ queue_cache_key ,
413+ component_requests ,
414+ timeout = get_serial_timeout (),
402415 )
403416
404417 if component_requests :
@@ -426,7 +439,9 @@ def _handle_queued_component_requests(
426439
427440 component_requests .pop (0 )
428441 cache .set (
429- queue_cache_key , component_requests , timeout = get_serial_timeout (),
442+ queue_cache_key ,
443+ component_requests ,
444+ timeout = get_serial_timeout (),
430445 )
431446
432447 merged_json_result = _handle_component_request (
@@ -450,7 +465,7 @@ def message(request: HttpRequest, component_name: str = None) -> JsonResponse:
450465 Args:
451466 param request: HttpRequest for the function-based view.
452467 param: component_name: Name of the component, e.g. "hello-world".
453-
468+
454469 Returns:
455470 `JsonRequest` with the following structure in the body:
456471 {
0 commit comments