Skip to content

Commit

Permalink
[CLN] run prettier to make the linter happy (#2091)
Browse files Browse the repository at this point in the history
## Description of changes

*Summarize the changes made by this PR.*
 - Improvements & Bug fixes
	 - run prettier to make the linter happy
 - New functionality
	 - None

## Test plan
*How are these changes tested?*
existing tests
- [x] Tests pass locally with `pytest` for python, `yarn test` for js,
`cargo test` for rust

## Documentation Changes
None
  • Loading branch information
HammadB authored May 1, 2024
1 parent 43f082b commit f91ea3d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
5 changes: 4 additions & 1 deletion clients/js/src/Errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,10 @@ export class ChromaValueError extends Error {

export class InvalidCollectionError extends Error {
name = "InvalidCollectionError";
constructor(message: string, public readonly cause?: unknown) {
constructor(
message: string,
public readonly cause?: unknown,
) {
super(message);
}
}
Expand Down
2 changes: 1 addition & 1 deletion clients/js/test/delete.collection.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ test("it should delete a collection", async () => {

var remainingEmbeddings = await collection.get();
expect(["test2", "test3"]).toEqual(
expect.arrayContaining(remainingEmbeddings.ids)
expect.arrayContaining(remainingEmbeddings.ids),
);
});

Expand Down
4 changes: 2 additions & 2 deletions clients/js/test/get.collection.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ test("wrong code returns an error", async () => {
expect(error).toBeDefined();
expect(error).toBeInstanceOf(ChromaValueError);
expect(error.message).toMatchInlineSnapshot(
`"Expected where operator to be one of $gt, $gte, $lt, $lte, $ne, $eq, $in, $nin, got $contains"`
`"Expected where operator to be one of $gt, $gte, $lt, $lte, $ne, $eq, $in, $nin, got $contains"`,
);
}
});
Expand Down Expand Up @@ -114,6 +114,6 @@ test("it should throw an error if the collection does not exist", async () => {
await chroma.reset();

await expect(
async () => await chroma.getCollection({ name: "test" })
async () => await chroma.getCollection({ name: "test" }),
).rejects.toThrow(Error);
});
10 changes: 5 additions & 5 deletions clients/js/test/query.collection.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ test("it should get embedding with matching documents", async () => {
expect(["test1"]).toEqual(expect.arrayContaining(results.ids[0]));
expect(["test2"]).not.toEqual(expect.arrayContaining(results.ids[0]));
expect(["This is a test"]).toEqual(
expect.arrayContaining(results.documents[0])
expect.arrayContaining(results.documents[0]),
);

const results2 = await collection.query({
Expand Down Expand Up @@ -125,7 +125,7 @@ test("it should query a collection with text", async () => {
expect(["test1"]).toEqual(expect.arrayContaining(results.ids[0]));
expect(["test2"]).not.toEqual(expect.arrayContaining(results.ids[0]));
expect(["This is a test"]).toEqual(
expect.arrayContaining(results.documents[0])
expect.arrayContaining(results.documents[0]),
);
});

Expand Down Expand Up @@ -155,7 +155,7 @@ test("it should query a collection with text and where", async () => {
expect(["test3"]).toEqual(expect.arrayContaining(results.ids[0]));
expect(["test2"]).not.toEqual(expect.arrayContaining(results.ids[0]));
expect(["This is a third test"]).toEqual(
expect.arrayContaining(results.documents[0])
expect.arrayContaining(results.documents[0]),
);
});

Expand Down Expand Up @@ -185,7 +185,7 @@ test("it should query a collection with text and where in", async () => {
expect(["test3"]).toEqual(expect.arrayContaining(results.ids[0]));
expect(["test2"]).not.toEqual(expect.arrayContaining(results.ids[0]));
expect(["This is a third test"]).toEqual(
expect.arrayContaining(results.documents[0])
expect.arrayContaining(results.documents[0]),
);
});

Expand Down Expand Up @@ -215,7 +215,7 @@ test("it should query a collection with text and where nin", async () => {
expect(["test3"]).toEqual(expect.arrayContaining(results.ids[0]));
expect(["test2"]).not.toEqual(expect.arrayContaining(results.ids[0]));
expect(["This is a third test"]).toEqual(
expect.arrayContaining(results.documents[0])
expect.arrayContaining(results.documents[0]),
);
});

Expand Down

0 comments on commit f91ea3d

Please sign in to comment.