From 9bb3f8c3b37df7f17f677f602228d5bbab3dcb95 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sat, 11 Oct 2025 14:33:43 +0200 Subject: [PATCH] Address consider-using-max-builtin. --- .pylintrc | 1 - plugins/module_utils/_swarm.py | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.pylintrc b/.pylintrc index 628a6b03..7f120c1d 100644 --- a/.pylintrc +++ b/.pylintrc @@ -381,7 +381,6 @@ disable=raw-checker-failed, # To clean up: abstract-method, arguments-differ, - consider-using-max-builtin, consider-using-with, fixme, import-error, # TODO figure out why pylint cannot find the module diff --git a/plugins/module_utils/_swarm.py b/plugins/module_utils/_swarm.py index c83b11c0..d5c0c0db 100644 --- a/plugins/module_utils/_swarm.py +++ b/plugins/module_utils/_swarm.py @@ -138,8 +138,7 @@ class AnsibleDockerSwarmClient(AnsibleDockerClient): True if node is part of swarm but its state is down, False otherwise """ - if repeat_check < 1: - repeat_check = 1 + repeat_check = max(1, repeat_check) if node_id is None: node_id = self.get_swarm_node_id()