From 45bbda5f1fbfd13ec0b73e14714281c792bd61ed Mon Sep 17 00:00:00 2001 From: "OpenRefactory, Inc" <56681071+openrefactory@users.noreply.github.com> Date: Mon, 14 Aug 2023 13:33:19 -0700 Subject: [PATCH] Comment: Updated a logical expression. Added a changelog fragment. --- changelogs/fragments/81504-update-logical-operation.yml | 2 ++ lib/ansible/galaxy/api.py | 5 +---- 2 files changed, 3 insertions(+), 4 deletions(-) create mode 100644 changelogs/fragments/81504-update-logical-operation.yml diff --git a/changelogs/fragments/81504-update-logical-operation.yml b/changelogs/fragments/81504-update-logical-operation.yml new file mode 100644 index 00000000000..51dbefdbc9e --- /dev/null +++ b/changelogs/fragments/81504-update-logical-operation.yml @@ -0,0 +1,2 @@ +bugfixes: + - collection dependency resolver - previous code had the same operand on both sides of a logical expression. Fix now updates the operand in the right side of the logical expression (https://github.com/ansible/ansible/pull/81511). diff --git a/lib/ansible/galaxy/api.py b/lib/ansible/galaxy/api.py index 54384a3b645..d83101330ef 100644 --- a/lib/ansible/galaxy/api.py +++ b/lib/ansible/galaxy/api.py @@ -330,10 +330,7 @@ class GalaxyAPI: if not isinstance(other_galaxy_api, self.__class__): return NotImplemented - return ( - self._priority > other_galaxy_api._priority or - self.name < self.name - ) + return self._priority > other_galaxy_api._priority @property # type: ignore[misc] # https://github.com/python/mypy/issues/1362 @g_connect(['v1', 'v2', 'v3'])