Skip to content

Commit

Permalink
get_coordinates: fix concatenation syntax
Browse files Browse the repository at this point in the history
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
  • Loading branch information
hinerm committed May 5, 2022
1 parent dca14fc commit dd2ed56
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions jgo/jgo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 [])

This comment has been minimized.

Copy link
@ctrueden

ctrueden May 5, 2022

Member

Oh, Python. Great language? Or the greatest language?

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 = (
Expand Down

1 comment on commit dd2ed56

@ctrueden
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

Please sign in to comment.