improve python version formatting (#7682)

This commit is contained in:
chris48s
2022-03-06 20:25:29 +00:00
committed by GitHub
parent 2cf35912c1
commit 9186f0d262
8 changed files with 87 additions and 5 deletions

View File

@@ -1,3 +1,4 @@
import { pep440VersionColor } from '../color-formatters.js'
import { renderVersionBadge } from '../version.js'
import { isLockfile, getDependencyVersion } from '../pipenv-helpers.js'
import { addv } from '../text-formatters.js'
@@ -80,6 +81,7 @@ class GithubPipenvLockedPythonVersion extends ConditionalGithubAuthV3Service {
version,
tag: branch,
defaultLabel: 'python',
versionFormatter: pep440VersionColor,
})
}
@@ -147,7 +149,7 @@ class GithubPipenvLockedDependencyVersion extends ConditionalGithubAuthV3Service
return {
label: dependency,
message: version ? addv(version) : ref,
color: 'blue',
color: version ? pep440VersionColor(version) : 'blue',
}
}