Skip to content

Commit 8e18dd0

Browse files
committed
Fix lint issue
1 parent 0fc961b commit 8e18dd0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/scanoss/cryptography.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ class ScanossCryptographyError(Exception):
1212
pass
1313

1414

15+
MIN_SPLIT_PARTS = 2
16+
17+
1518
@dataclass
1619
class CryptographyConfig:
1720
purl: List[str]
@@ -29,7 +32,7 @@ def __post_init__(self):
2932
if self.purl:
3033
for purl in self.purl:
3134
parts = purl.split('@')
32-
if not (len(parts) >= 2 and parts[1]):
35+
if not (len(parts) >= MIN_SPLIT_PARTS and parts[1]):
3336
raise ValueError(
3437
f'Invalid PURL format: "{purl}".'
3538
f'It must include a version (e.g., pkg:type/name@version)'

0 commit comments

Comments
 (0)