Github user tliron commented on a diff in the pull request:

    https://github.com/apache/incubator-ariatosca/pull/100#discussion_r115289271
  
    --- Diff: aria/modeling/service_template.py ---
    @@ -2131,13 +2132,15 @@ def resolve(self, model_storage):
             # moved to.
             plugins = model_storage.plugin.list()
             matching_plugins = []
    -        for plugin in plugins:
    -            # TODO: we need to use a version comparator
    -            if (plugin.name == self.name) and \
    -                    ((self.version is None) or (plugin.package_version >= 
self.version)):
    -                matching_plugins.append(plugin)
    +        if plugins:
    +            for plugin in plugins:
    +                if (plugin.name == self.name) and \
    --- End diff --
    
    I strongly disagree, especially in this case when there is `or` and `and` 
in the same clause. Do you otherwise expect the reader to know the priority of 
logical binary operations? Parentheses remove any potential confusion.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to