Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Feb 23, 2024
1 parent f625fa8 commit d17518c
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions omeroweb/webgateway/marshal.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,10 @@ def getChannelsNoRe(image):
join fetch c.statsInfo
where p.id=:id"""
pixels = conn.getQueryService().findByQuery(query, params, conn.SERVICE_OPTS)
return [ChannelWrapper(conn, c, idx=n, img=image)
for n, c in enumerate(pixels.iterateChannels())]
return [
ChannelWrapper(conn, c, idx=n, img=image)
for n, c in enumerate(pixels.iterateChannels())
]


def eventContextMarshal(event_context):
Expand Down Expand Up @@ -103,7 +105,7 @@ def rdefMarshal(rdef, image):

channels = []

for rdef_ch, channel in zip(rdef['c'], getChannelsNoRe(image)):
for rdef_ch, channel in zip(rdef["c"], getChannelsNoRe(image)):

chan = {
"emissionWave": channel.getEmissionWave(),
Expand Down Expand Up @@ -260,7 +262,9 @@ def imageMarshal(image, key=None, request=None):
width, height = image._re.getTileSize()
zoomLevelScaling = image.getZoomLevelScaling()

rv.update({"tile_size": {"width": width, "height": height}, "levels": levels})
rv.update(
{"tile_size": {"width": width, "height": height}, "levels": levels}
)
if zoomLevelScaling is not None:
rv["zoomLevelScaling"] = zoomLevelScaling

Expand Down

0 comments on commit d17518c

Please sign in to comment.