We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0fc961b commit 8e18dd0Copy full SHA for 8e18dd0
src/scanoss/cryptography.py
@@ -12,6 +12,9 @@ class ScanossCryptographyError(Exception):
12
pass
13
14
15
+MIN_SPLIT_PARTS = 2
16
+
17
18
@dataclass
19
class CryptographyConfig:
20
purl: List[str]
@@ -29,7 +32,7 @@ def __post_init__(self):
29
32
if self.purl:
30
33
for purl in self.purl:
31
34
parts = purl.split('@')
- if not (len(parts) >= 2 and parts[1]):
35
+ if not (len(parts) >= MIN_SPLIT_PARTS and parts[1]):
36
raise ValueError(
37
f'Invalid PURL format: "{purl}".'
38
f'It must include a version (e.g., pkg:type/name@version)'
0 commit comments