mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-03-26 21:33:12 +00:00
fix ruff case SIM103 (#11119)
* fix ruff case SIM103 * add changelog frag
This commit is contained in:
@@ -47,6 +47,4 @@ def ismount(path):
|
||||
return True # path/.. on a different device as path
|
||||
ino1 = s1.st_ino
|
||||
ino2 = s2.st_ino
|
||||
if ino1 == ino2:
|
||||
return True # path/.. is the same i-node as path
|
||||
return False
|
||||
return ino1 == ino2 # path/.. is the same i-node as path
|
||||
|
||||
@@ -139,10 +139,7 @@ def is_valid_ip_prefix(ip_prefix):
|
||||
|
||||
ip_prefix_int = int(ip_prefix)
|
||||
|
||||
if ip_prefix_int < 0 or ip_prefix_int > 32:
|
||||
return False
|
||||
|
||||
return True
|
||||
return not (ip_prefix_int < 0 or ip_prefix_int > 32)
|
||||
|
||||
|
||||
def ip_prefix_to_netmask(ip_prefix, skip_check=False):
|
||||
@@ -243,10 +240,7 @@ def is_valid_ip6_prefix(ip6_prefix):
|
||||
|
||||
ip6_prefix_int = int(ip6_prefix)
|
||||
|
||||
if ip6_prefix_int < 0 or ip6_prefix_int > 128:
|
||||
return False
|
||||
|
||||
return True
|
||||
return not (ip6_prefix_int < 0 or ip6_prefix_int > 128)
|
||||
|
||||
|
||||
def get_object_ref(module, name, uuid=None, obj_type="VM", fail=True, msg_prefix=""):
|
||||
|
||||
Reference in New Issue
Block a user