mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-01 09:56:18 +00:00
[PR #11119/41923e43 backport][stable-12] fix ruff case SIM103 (#11132)
fix ruff case SIM103 (#11119)
* fix ruff case SIM103
* add changelog frag
(cherry picked from commit 41923e43bd)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
parent
ac6c6df2c7
commit
93d23cfef6
39 changed files with 115 additions and 230 deletions
|
|
@ -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=""):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue