Skip to content

handle None versions#704

Merged
mvdbeek merged 1 commit intomasterfrom
none_version
Jun 24, 2017
Merged

handle None versions#704
mvdbeek merged 1 commit intomasterfrom
none_version

Conversation

@bgruening
Copy link
Member

def write_targets(self, ctx, target_filename, mulled_targets):
with open(target_filename, "w") as f:
contents = ",".join(["%s=%s" % (t.package_name, t.version) for t in mulled_targets])
target_strings = list()
Copy link
Member

Choose a reason for hiding this comment

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

how about contents = ",".join(["%s=%s" % (t.package_name, t.version) if t.version else "%s" % t.package_name for t in mulled_targets]) ?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't like these large list comprehensions, they are less readable and this section is not performance critical.

@mvdbeek
Copy link
Member

mvdbeek commented Jun 24, 2017

Is it a good idea to allow this though? Should we not better fix the tools?

@bgruening
Copy link
Member Author

I don't think such things are a good idea. But Galaxy allows this so this should work here as well. However, I have on my todo list to enhance planemo lint and if this all is merged I will fix the galaxyp tools.

@mvdbeek
Copy link
Member

mvdbeek commented Jun 24, 2017

Sounds good then!

@mvdbeek mvdbeek merged commit 9fc1296 into master Jun 24, 2017
@nsoranzo nsoranzo deleted the none_version branch May 29, 2020 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants