fix ruff case SIM110 (#11215)

* fix ruff case SIM110

* Update plugins/module_utils/xenserver.py

Co-authored-by: Felix Fontein <felix@fontein.de>

* add changelog frag

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
Alexei Znamensky
2025-11-26 09:47:50 +13:00
committed by GitHub
parent d364e35423
commit 862fe79a22
16 changed files with 34 additions and 72 deletions

View File

@@ -219,11 +219,7 @@ def is_valid_ip6_addr(ip6_addr):
ip6_addr_hextet_regex = re.compile("^[0-9a-f]{1,4}$")
for ip6_addr_hextet in ip6_addr_split:
if not bool(ip6_addr_hextet_regex.match(ip6_addr_hextet)):
return False
return True
return all(ip6_addr_hextet_regex.match(ip6_addr_hextet) for ip6_addr_hextet in ip6_addr_split)
def is_valid_ip6_prefix(ip6_prefix):