Skip to content

Commit de1cae2

Browse files
committed
comments
1 parent cf3eda9 commit de1cae2

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/managers/conda/condaUtils.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -757,10 +757,8 @@ export async function pickPythonVersion(
757757
);
758758

759759
// Sort versions by major version (descending), ignoring minor/patch for simplicity
760-
versions = versions.sort((a, b) => {
761-
const getMajor = (v: string) => parseInt(v.split('.')[0], 10);
762-
return getMajor(b) - getMajor(a);
763-
});
760+
const getMajor = (v: string) => parseInt(v.split('.')[0]);
761+
versions = versions.sort((a, b) => getMajor(b) - getMajor(a));
764762

765763
if (!versions || versions.length === 0) {
766764
versions = ['3.13', '3.12', '3.11', '3.10', '3.9'];

0 commit comments

Comments
 (0)