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 3b7fb4d commit e168efeCopy full SHA for e168efe
codeqldepgraph/dependencies.py
@@ -48,7 +48,16 @@ def getName(self):
48
return self.name
49
50
def getPurl(self):
51
- return f"pkg:{self.manager}/{self.namespace}/{self.name}@{self.version}"
+ result = f"pkg:"
52
+ if self.manager:
53
+ result += f"{self.manager}/"
54
+ if self.namespace:
55
+ result += f"{self.namespace}/"
56
+ result += f"{self.name}"
57
+ if self.version:
58
+ result += f"@{self.version}"
59
+
60
+ return result
61
62
def __str__(self) -> str:
63
"""Return a string representation of the dependency"""
0 commit comments