lint: reformat python code with black
This commit is contained in:
parent
331beb01b4
commit
a406a7974b
88 changed files with 2579 additions and 1608 deletions
|
@ -11,12 +11,14 @@ class BridgelinesDict(TypedDict):
|
|||
bridgelines: List[str]
|
||||
|
||||
|
||||
def bridgelines(pool: Pool, *, distribution_method: Optional[str] = None) -> BridgelinesDict:
|
||||
def bridgelines(
|
||||
pool: Pool, *, distribution_method: Optional[str] = None
|
||||
) -> BridgelinesDict:
|
||||
# Fetch bridges with selectinload for related data
|
||||
query = Bridge.query.options(selectinload(Bridge.conf)).filter(
|
||||
Bridge.destroyed.is_(None),
|
||||
Bridge.deprecated.is_(None),
|
||||
Bridge.bridgeline.is_not(None)
|
||||
Bridge.bridgeline.is_not(None),
|
||||
)
|
||||
|
||||
if distribution_method is not None:
|
||||
|
@ -26,7 +28,4 @@ def bridgelines(pool: Pool, *, distribution_method: Optional[str] = None) -> Bri
|
|||
bridgelines = [b.bridgeline for b in query.all() if b.conf.pool_id == pool.id]
|
||||
|
||||
# Return dictionary directly, inlining the previous `to_dict` functionality
|
||||
return {
|
||||
"version": "1.0",
|
||||
"bridgelines": bridgelines
|
||||
}
|
||||
return {"version": "1.0", "bridgelines": bridgelines}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue