Skip to content

Commit

Permalink
fix(python): use pep440 versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
viceice committed Nov 5, 2024
1 parent 41b0a50 commit 8823c75
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"vite": "5.4.10"
},
"dependencies": {
"@renovatebot/pep440": "3.0.20",
"@sindresorhus/is": "7.0.1",
"clipanion": "3.2.1",
"common-tags": "1.8.2",
Expand Down
9 changes: 9 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/cli/tools/python/utils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import fs from 'node:fs/promises';
import path from 'node:path';
import { valid as validPep440 } from '@renovatebot/pep440';
import { execa } from 'execa';
import { parse as parseIni } from 'ini';
import { inject, injectable } from 'inversify';
Expand Down Expand Up @@ -170,7 +171,7 @@ export abstract class PipBaseInstallService extends PythonBaseInstallService {
}

override async validate(version: string): Promise<boolean> {
if (!(await super.validate(version))) {
if (!validPep440(version)) {
return false;
}

Expand Down

0 comments on commit 8823c75

Please sign in to comment.