Skip to content

Commit

Permalink
fix(manager/uv): do not unset currentValue
Browse files Browse the repository at this point in the history
  • Loading branch information
mkniewallner committed Sep 9, 2024
1 parent 3155be1 commit 4f62c66
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 18 deletions.
5 changes: 0 additions & 5 deletions lib/modules/manager/pep621/processors/uv.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,27 +95,22 @@ describe('modules/manager/pep621/processors/uv', () => {
},
{
depName: 'dep2',
currentValue: '',
skipReason: 'git-dependency',
},
{
depName: 'dep3',
currentValue: '',
skipReason: 'path-dependency',
},
{
depName: 'dep4',
currentValue: '',
skipReason: 'unsupported-url',
},
{
depName: 'dep5',
currentValue: '',
skipReason: 'inherited-dependency',
},
{
depName: 'dep6',
currentValue: '',
skipReason: 'invalid-dependency-specification',
},
]);
Expand Down
18 changes: 5 additions & 13 deletions lib/modules/manager/pep621/processors/uv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import is from '@sindresorhus/is';
import { quote } from 'shlex';
import { TEMPORARY_ERROR } from '../../../../constants/error-messages';
import { logger } from '../../../../logger';
import type { SkipReason } from '../../../../types';
import { exec } from '../../../../util/exec';
import type { ExecOptions, ToolConstraint } from '../../../../util/exec/types';
import { getSiblingFileName, readLocalFile } from '../../../../util/fs';
Expand Down Expand Up @@ -43,23 +42,16 @@ export class UvProcessor implements PyProjectProcessor {

const depSource = uv.sources[dep.depName];
if (depSource) {
let skipReason: SkipReason | undefined;

if (depSource.git) {
skipReason = 'git-dependency';
dep.skipReason = 'git-dependency';
} else if (depSource.url) {
skipReason = 'unsupported-url';
dep.skipReason = 'unsupported-url';
} else if (depSource.path) {
skipReason = 'path-dependency';
dep.skipReason = 'path-dependency';
} else if (depSource.workspace) {
skipReason = 'inherited-dependency';
dep.skipReason = 'inherited-dependency';
} else {
skipReason = 'invalid-dependency-specification';
}

if (skipReason) {
dep.currentValue = '';
dep.skipReason = skipReason;
dep.skipReason = 'invalid-dependency-specification';
}
}
}
Expand Down

0 comments on commit 4f62c66

Please sign in to comment.