From dd2ed5640712414e4cd6cc812d2b3576e0313cd8 Mon Sep 17 00:00:00 2001 From: hinerm Date: Thu, 5 May 2022 10:38:40 -0500 Subject: [PATCH] get_coordinates: fix concatenation syntax Having "+ xxx" on a new line looked like valid syntax at first glance but of course is not. The concatenation was just resolving as independent lines of code and never actually adding versions or classifiers to the jgo coordinates. This resulted in all lists of the same components hashing to the same string, regardless of those component versions. Closes #68 --- jgo/jgo.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/jgo/jgo.py b/jgo/jgo.py index bf71243..a9bbb9a 100644 --- a/jgo/jgo.py +++ b/jgo/jgo.py @@ -132,9 +132,10 @@ def dependency_string(self): return xml def get_coordinates(self): - return [self.groupId, self.artifactId] - +([self.version] if self.version != VERSION_MANAGED else []) - +([self.classifier] if self.classifier else []) + return ([self.groupId, self.artifactId] + + ([self.version] if self.version != Endpoint.VERSION_MANAGED else []) + + ([self.classifier] if self.classifier else []) + ) def is_endpoint(string): endpoint_elements = (