Skip to content

Commit 48d2886

Browse files
committed
Code format
1 parent 685285a commit 48d2886

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

src/labthings/server/extensions.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,10 @@ def __init__(
5252

5353
self.static_view_class = static_from(static_folder)
5454
self.add_view(
55-
self.static_view_class, f"{static_url_path}", f"{static_url_path}/<path:path>", endpoint="static"
55+
self.static_view_class,
56+
f"{static_url_path}",
57+
f"{static_url_path}/<path:path>",
58+
endpoint="static",
5659
)
5760

5861
@property
@@ -67,7 +70,10 @@ def add_view(self, view_class, *urls, endpoint=None, **kwargs):
6770
cleaned_urls[i] = cleaned_urls[i][1:]
6871

6972
# Expand the rule to include extension name
70-
full_urls = ["/{}/{}".format(self._name_uri_safe, cleaned_url) for cleaned_url in cleaned_urls]
73+
full_urls = [
74+
"/{}/{}".format(self._name_uri_safe, cleaned_url)
75+
for cleaned_url in cleaned_urls
76+
]
7177

7278
# Build endpoint if none given
7379
if not endpoint:

src/labthings/server/schema.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,10 @@ def generate_links(self, data, **kwargs):
151151
view_urls = view_data.get("urls")
152152
# Try to build a URL
153153
try:
154-
urls = [url_for(EXTENSION_LIST_ENDPOINT, _external=True) + url for url in view_urls]
154+
urls = [
155+
url_for(EXTENSION_LIST_ENDPOINT, _external=True) + url
156+
for url in view_urls
157+
]
155158
except BuildError:
156159
urls = []
157160
# TODO: Tidy up this nasty jazz

0 commit comments

Comments
 (0)