From d946720812bb5fbf6c72d3c2b41999cecf86bfbb Mon Sep 17 00:00:00 2001 From: Mathieu Kniewallner Date: Sat, 26 Oct 2024 12:39:40 +0200 Subject: [PATCH] refactor(pep621): use `LooseArray` Co-authored-by: Sebastian Poxhofer --- lib/modules/manager/pep621/schema.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/modules/manager/pep621/schema.ts b/lib/modules/manager/pep621/schema.ts index 3eadfa254a16a9..59f53a26c4e4d2 100644 --- a/lib/modules/manager/pep621/schema.ts +++ b/lib/modules/manager/pep621/schema.ts @@ -87,10 +87,8 @@ export const PyProjectSchema = z.object({ 'dependency-groups': z .record( z.string(), - z - .array(z.union([z.string(), z.object({})])) - // Skip non-string entries, like `{include-group = "typing"}`, as they are not dependencies. - .transform((deps) => deps.filter(is.string)), + // Skip non-string entries, like `{include-group = "typing"}`, as they are not dependencies. + LooseArray(z.string()) ) .optional(), tool: z