Skip to content

Commit 1645385

Browse files
committed
npm formatting
1 parent 0af89d5 commit 1645385

2 files changed

Lines changed: 25 additions & 14 deletions

File tree

src/datasource/zarr-vectors/backend.ts

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -176,12 +176,18 @@ function buildPointAnnotationGeometryData(
176176
// Geometry — reuse a Float32Array view onto the source positions
177177
// for this point.
178178
const point = positions.subarray(i * rank, (i + 1) * rank);
179-
pointHandler.serialize(dv, perAnnotationStride * i, IS_LITTLE_ENDIAN, rank, {
180-
type: AnnotationType.POINT,
181-
point,
182-
id: ids[i],
183-
properties: [],
184-
} as any);
179+
pointHandler.serialize(
180+
dv,
181+
perAnnotationStride * i,
182+
IS_LITTLE_ENDIAN,
183+
rank,
184+
{
185+
type: AnnotationType.POINT,
186+
point,
187+
id: ids[i],
188+
properties: [],
189+
} as any,
190+
);
185191
// Properties
186192
for (let p = 0; p < numProps; ++p) {
187193
propValues[p] = propertyValuesPerPoint[p][i] as number;
@@ -197,7 +203,9 @@ function buildPointAnnotationGeometryData(
197203
result.typeToInstanceCounts = annotationTypes.map(() => [] as number[]);
198204
result.typeToSize = annotationTypes.map(() => 0);
199205
result.typeToIds[AnnotationType.POINT] = ids;
200-
result.typeToIdMaps[AnnotationType.POINT] = new Map(ids.map((id, i) => [id, i]));
206+
result.typeToIdMaps[AnnotationType.POINT] = new Map(
207+
ids.map((id, i) => [id, i]),
208+
);
201209
result.typeToInstanceCounts[AnnotationType.POINT] = Array.from(
202210
{ length: numPoints },
203211
(_, i) => i,

src/datasource/zarr-vectors/frontend.ts

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,11 @@ async function buildPropertySpecsAndDtypes(
317317
declaredHints.map((p) => [String(p.identifier), p]),
318318
);
319319

320-
const names = await listAttributeNames(sharedKvStoreContext, levelUrl, options);
320+
const names = await listAttributeNames(
321+
sharedKvStoreContext,
322+
levelUrl,
323+
options,
324+
);
321325

322326
// Stable order: declared properties first (in their declared order),
323327
// then any remaining listed attributes in alphabetical order.
@@ -346,8 +350,7 @@ async function buildPropertySpecsAndDtypes(
346350
`attribute ${JSON.stringify(name)} metadata`,
347351
options,
348352
);
349-
dtype =
350-
arrayMeta?.attributes?.dtype ?? arrayMeta?.data_type ?? undefined;
353+
dtype = arrayMeta?.attributes?.dtype ?? arrayMeta?.data_type ?? undefined;
351354
} catch {
352355
dtype = undefined;
353356
}
@@ -497,13 +500,13 @@ async function buildAnnotationMetadata(
497500
}
498501
const rank = bounds[0].length;
499502
if (bounds[1].length !== rank) {
500-
throw new Error("zarr-vectors store: bounds[0] and bounds[1] have different rank");
503+
throw new Error(
504+
"zarr-vectors store: bounds[0] and bounds[1] have different rank",
505+
);
501506
}
502507
const chunkShape = zv.chunk_shape;
503508
if (!Array.isArray(chunkShape) || chunkShape.length !== rank) {
504-
throw new Error(
505-
`zarr-vectors store: 'chunk_shape' must have rank ${rank}`,
506-
);
509+
throw new Error(`zarr-vectors store: 'chunk_shape' must have rank ${rank}`);
507510
}
508511

509512
const lowerBounds = Float64Array.from(bounds[0], Number);

0 commit comments

Comments
 (0)