File tree 3 files changed +20
-1
lines changed
lib/modules/manager/pep621
3 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -390,6 +390,21 @@ describe('modules/manager/pep621/extract', () => {
390
390
] ) ;
391
391
} ) ;
392
392
393
+ it ( 'should extract dependencies from uv when using unnamed index' , async ( ) => {
394
+ const result = await extractPackageFile (
395
+ codeBlock `
396
+ [project]
397
+ dependencies = ["dep1"]
398
+
399
+ [[tool.uv.index]]
400
+ url = "https://example.com"
401
+ ` ,
402
+ 'pyproject.toml' ,
403
+ ) ;
404
+
405
+ expect ( result ?. deps ) . toMatchObject ( [ { depName : 'dep1' } ] ) ;
406
+ } ) ;
407
+
393
408
it ( 'should extract dependencies from hatch environments' , async ( ) => {
394
409
const hatchPyProject = Fixtures . get ( 'pyproject_with_hatch.toml' ) ;
395
410
const result = await extractPackageFile ( hatchPyProject , 'pyproject.toml' ) ;
Original file line number Diff line number Diff line change @@ -339,6 +339,10 @@ async function getUvIndexCredentials(
339
339
const entries = [ ] ;
340
340
341
341
for ( const { name, url } of uv_indexes ) {
342
+ if ( ! name ) {
343
+ continue ;
344
+ }
345
+
342
346
const parsedUrl = parseUrl ( url ) ;
343
347
// istanbul ignore if
344
348
if ( ! parsedUrl ) {
Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ const UvSchema = z.object({
79
79
index : z
80
80
. array (
81
81
z . object ( {
82
- name : z . string ( ) ,
82
+ name : z . string ( ) . optional ( ) ,
83
83
url : z . string ( ) ,
84
84
default : z . boolean ( ) . default ( false ) ,
85
85
explicit : z . boolean ( ) . default ( false ) ,
You can’t perform that action at this time.
0 commit comments