Skip to content

Commit 4527e9f

Browse files
committed
Quick formatting run
1 parent 4424d59 commit 4527e9f

6 files changed

+12
-23
lines changed

docs/examples/python/configure_asgi.py

+4-6
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@
1313

1414
from reactpy_django import REACTPY_WEBSOCKET_ROUTE # noqa: E402
1515

16-
application = ProtocolTypeRouter(
17-
{
18-
"http": django_asgi_app,
19-
"websocket": URLRouter([REACTPY_WEBSOCKET_ROUTE]),
20-
}
21-
)
16+
application = ProtocolTypeRouter({
17+
"http": django_asgi_app,
18+
"websocket": URLRouter([REACTPY_WEBSOCKET_ROUTE]),
19+
})

docs/examples/python/configure_asgi_middleware.py

+4-6
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@
99
# start
1010
from channels.auth import AuthMiddlewareStack # noqa: E402
1111

12-
application = ProtocolTypeRouter(
13-
{
14-
"http": django_asgi_app,
15-
"websocket": AuthMiddlewareStack(URLRouter([REACTPY_WEBSOCKET_ROUTE])),
16-
}
17-
)
12+
application = ProtocolTypeRouter({
13+
"http": django_asgi_app,
14+
"websocket": AuthMiddlewareStack(URLRouter([REACTPY_WEBSOCKET_ROUTE])),
15+
})

docs/examples/python/django_css_external_link.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
@component
55
def my_component():
66
return html.div(
7-
html.link(
8-
{"rel": "stylesheet", "href": "https://example.com/external-styles.css"}
9-
),
7+
html.link({"rel": "stylesheet", "href": "https://example.com/external-styles.css"}),
108
html.button("My Button!"),
119
)

docs/examples/python/use_mutation_args_kwargs.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
from reactpy_django.hooks import use_mutation
44

55

6-
def example_mutation(value: int, other_value: bool = False):
7-
...
6+
def example_mutation(value: int, other_value: bool = False): ...
87

98

109
@component

docs/examples/python/use_mutation_query_refetch.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@ def submit_event(event):
2727
elif item_query.error or not item_query.data:
2828
rendered_items = html.h2("Error when loading!")
2929
else:
30-
rendered_items = html.ul(
31-
html.li(item.text, key=item.pk) for item in item_query.data
32-
)
30+
rendered_items = html.ul(html.li(item.text, key=item.pk) for item in item_query.data)
3331

3432
# Handle all possible mutation states
3533
if item_mutation.loading:

docs/examples/python/use_query.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ def todo_list():
1818
elif item_query.error or not item_query.data:
1919
rendered_items = html.h2("Error when loading!")
2020
else:
21-
rendered_items = html.ul(
22-
[html.li(item.text, key=item.pk) for item in item_query.data]
23-
)
21+
rendered_items = html.ul([html.li(item.text, key=item.pk) for item in item_query.data])
2422

2523
return html.div("Rendered items: ", rendered_items)

0 commit comments

Comments
 (0)