diff --git a/lib/modules/manager/pep621/schema.ts b/lib/modules/manager/pep621/schema.ts index f63791335fdd32..4fc2b80a7dc697 100644 --- a/lib/modules/manager/pep621/schema.ts +++ b/lib/modules/manager/pep621/schema.ts @@ -8,6 +8,37 @@ const DependencyRecordSchema = z .record(z.string(), z.array(z.string())) .optional(); +const PdmSchema = z.object({ + 'dev-dependencies': DependencyRecordSchema, + source: z + .array( + z.object({ + url: z.string(), + name: z.string(), + verify_ssl: z.boolean().optional(), + }), + ) + .optional(), +}); + +const HatchSchema = z.object({ + envs: z + .record( + z.string(), + z + .object({ + dependencies: DependencyListSchema, + 'extra-dependencies': DependencyListSchema, + }) + .optional(), + ) + .optional(), +}); + +const UvSchema = z.object({ + 'dev-dependencies': DependencyListSchema, +}); + export const PyProjectSchema = z.object({ project: z .object({ @@ -25,40 +56,9 @@ export const PyProjectSchema = z.object({ .optional(), tool: z .object({ - pdm: z - .object({ - 'dev-dependencies': DependencyRecordSchema, - source: z - .array( - z.object({ - url: z.string(), - name: z.string(), - verify_ssl: z.boolean().optional(), - }), - ) - .optional(), - }) - .optional(), - hatch: z - .object({ - envs: z - .record( - z.string(), - z - .object({ - dependencies: DependencyListSchema, - 'extra-dependencies': DependencyListSchema, - }) - .optional(), - ) - .optional(), - }) - .optional(), - uv: z - .object({ - 'dev-dependencies': DependencyListSchema, - }) - .optional(), + pdm: PdmSchema.optional(), + hatch: HatchSchema.optional(), + uv: UvSchema.optional(), }) .optional(), });