Skip to content

Commit 0efbf0a

Browse files
committed
wip
Signed-off-by: Jan Kowalleck <[email protected]>
1 parent 63b6305 commit 0efbf0a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cyclonedx/model/vulnerability.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -635,8 +635,9 @@ def get_localised_vector(self, vector: str) -> str:
635635
"""
636636
if self is VulnerabilityScoreSource.CVSS_V4 and vector.startswith('CVSS:4.'):
637637
return re.sub(r'^CVSS:4\.\d/?', '', vector)
638-
if (self is VulnerabilityScoreSource.CVSS_V3_1 or self is VulnerabilityScoreSource.CVSS_V3) \
639-
and vector.startswith('CVSS:3.'):
638+
if (
639+
self in (VulnerabilityScoreSource.CVSS_V3_1, VulnerabilityScoreSource.CVSS_V3)
640+
) and vector.startswith('CVSS:3.'):
640641
return re.sub(r'^CVSS:3\.\d/?', '', vector)
641642
if self is VulnerabilityScoreSource.CVSS_V2 and vector.startswith('CVSS:2.'):
642643
return re.sub(r'^CVSS:2\.\d/?', '', vector)

0 commit comments

Comments
 (0)