From 98c5a4a7d8b7aefd8e89b440d8205c77d5f6afe1 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sun, 12 Oct 2025 10:21:22 +0200 Subject: [PATCH] Address unnecessary-pass. --- .pylintrc | 1 - plugins/module_utils/_api/auth.py | 1 - plugins/module_utils/_api/transport/npipeconn.py | 2 +- plugins/module_utils/_api/transport/sshconn.py | 2 +- 4 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.pylintrc b/.pylintrc index f21cbc81..ecbaaade 100644 --- a/.pylintrc +++ b/.pylintrc @@ -391,7 +391,6 @@ disable=raw-checker-failed, redefined-outer-name, # needed for test fixtures subprocess-popen-preexec-fn, unexpected-keyword-arg, - unnecessary-pass, unsupported-assignment-operation, # TODO: needs better typing info unused-argument, unused-variable, diff --git a/plugins/module_utils/_api/auth.py b/plugins/module_utils/_api/auth.py index e6d44085..317e6c77 100644 --- a/plugins/module_utils/_api/auth.py +++ b/plugins/module_utils/_api/auth.py @@ -370,7 +370,6 @@ def _load_legacy_config(config_file): } except Exception as e: # pylint: disable=broad-exception-caught log.debug(e) - pass log.debug("All parsing attempts failed - returning empty config") return {} diff --git a/plugins/module_utils/_api/transport/npipeconn.py b/plugins/module_utils/_api/transport/npipeconn.py index ca348426..3f618b38 100644 --- a/plugins/module_utils/_api/transport/npipeconn.py +++ b/plugins/module_utils/_api/transport/npipeconn.py @@ -61,7 +61,7 @@ class NpipeHTTPConnectionPool(urllib3.connectionpool.HTTPConnectionPool): self, "Pool reached maximum size and no more connections are allowed.", ) from exc - pass # Oh well, we'll create a new connection then + # Oh well, we'll create a new connection then return conn or self._new_conn() diff --git a/plugins/module_utils/_api/transport/sshconn.py b/plugins/module_utils/_api/transport/sshconn.py index 0a4bcb1a..ba0a3909 100644 --- a/plugins/module_utils/_api/transport/sshconn.py +++ b/plugins/module_utils/_api/transport/sshconn.py @@ -168,7 +168,7 @@ class SSHConnectionPool(urllib3.connectionpool.HTTPConnectionPool): self, "Pool reached maximum size and no more connections are allowed.", ) from exc - pass # Oh well, we'll create a new connection then + # Oh well, we'll create a new connection then return conn or self._new_conn()