Module: check_mk
Branch: master
Commit: de2909c02ab7231e346c4ffbde10f2667110f117
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=de2909c02ab723…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Tue Jul 3 12:47:39 2018 +0200
Fixed and enabled pointless-string-statement warnings.
Change-Id: Ibbd3bf5749a76561d80cd4db7e34f40085a5d6be
---
checks/agent_jolokia | 8 +-------
cmk_base/check_api.py | 5 ++++-
tests/pylint/pylintrc | 1 -
3 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/checks/agent_jolokia b/checks/agent_jolokia
index dee2694..732d12c 100644
--- a/checks/agent_jolokia
+++ b/checks/agent_jolokia
@@ -26,13 +26,7 @@
def agent_jolokia_arguments(params, hostname, ipaddress):
- arglist = []
- """
- if "timeout" in params:
- args += ' --timeout %d' % params["timeout"]
- """
-
- arglist.append('--server %s' % quote_shell_string(ipaddress))
+ arglist = ['--server %s' % quote_shell_string(ipaddress)]
for param in ['port', 'suburi', 'instance',
'protocol']:
if param in params:
diff --git a/cmk_base/check_api.py b/cmk_base/check_api.py
index ea67f01..1353834 100644
--- a/cmk_base/check_api.py
+++ b/cmk_base/check_api.py
@@ -83,7 +83,10 @@ Global variables:
function. See get_rate() documentation for details
ZERO Used as value for the "onwrap" argument of the
get_rate()
function. See get_rate() documentation for details
-"""
+""" # # pylint: disable=pointless-string-statement
+
+# NOTE: The above suppression is necessary because our testing framework blindly
+# concatenates lots of files, including this one.
import cmk.debug as _debug
import cmk.paths as _paths
diff --git a/tests/pylint/pylintrc b/tests/pylint/pylintrc
index a6f3a70..f5e6fd4 100644
--- a/tests/pylint/pylintrc
+++ b/tests/pylint/pylintrc
@@ -53,7 +53,6 @@ disable=
no-else-return,
no-self-use,
old-style-class,
- pointless-string-statement,
protected-access,
redefine-in-handler,
redefined-argument-from-local,