Skip to content

Commit c37813b

Browse files
author
chadcarlson
committed
Clean up comprehensions.
1 parent 4a69e32 commit c37813b

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

platformshconfig/config.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,9 +320,17 @@ def get_upstream_routes(self, app_name=None):
320320
if app_name:
321321
# On Dedicated, the upstream name sometimes is `app:http` instead of just `app`.
322322
# If no name is specified then don't bother checking.
323-
return {url: route for url, route in self.routes().items() if route["type"] == "upstream" and app_name == route["upstream"].split(":")[0]}
323+
return {
324+
url: route
325+
for url, route in self.routes().items()
326+
if route["type"] == "upstream" and app_name == route["upstream"].split(":")[0]
327+
}
324328
else:
325-
return {url: route for url, route in self.routes().items() if route["type"] == "upstream"}
329+
return {
330+
url: route
331+
for url, route in self.routes().items()
332+
if route["type"] == "upstream"
333+
}
326334

327335
def get_route(self, route_id):
328336
"""Get route definition by route ID.

0 commit comments

Comments
 (0)