mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-03-26 21:33:12 +00:00
[PR #11215/862fe79a backport][stable-12] fix ruff case SIM110 (#11217)
fix ruff case SIM110 (#11215)
* fix ruff case SIM110
* Update plugins/module_utils/xenserver.py
* add changelog frag
---------
(cherry picked from commit 862fe79a22)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
@@ -45,11 +45,7 @@ def xml_equal(x, y):
|
||||
if len(x_children) != len(y_children):
|
||||
return False
|
||||
|
||||
for x, y in zip(x_children, y_children):
|
||||
if not xml_equal(x, y):
|
||||
return False
|
||||
|
||||
return True
|
||||
return all(xml_equal(x, y) for x, y in zip(x_children, y_children))
|
||||
|
||||
|
||||
def assert_xml_equal(x, y):
|
||||
|
||||
@@ -188,10 +188,7 @@ def test__new_fallback_urls(mocker):
|
||||
|
||||
def isInList(l, i):
|
||||
print(f"checking if {i} in {l}")
|
||||
for item in l:
|
||||
if item == i:
|
||||
return True
|
||||
return False
|
||||
return any(item == i for item in l) # TODO: check if return `i in l` works
|
||||
|
||||
|
||||
@patch("ansible_collections.community.general.plugins.modules.jenkins_plugin.fetch_url")
|
||||
|
||||
Reference in New Issue
Block a user