Module: check_mk
Branch: master
Commit: e4a9015ddd6fddb9999b54c3b344107eca78f670
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e4a9015ddd6fdd…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Fri Jul 13 12:35:50 2018 +0200
Make pylint happy again (hopefully)...
Change-Id: Ib709a4928780c5cffecc659c14dc9b4b2efbac73
---
cmk/gui/plugins/wato/check_mk_configuration.py | 10 +++++-----
cmk/gui/plugins/wato/check_parameters.py | 4 ++--
cmk/gui/wato/__init__.py | 3 ++-
3 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/cmk/gui/plugins/wato/check_mk_configuration.py
b/cmk/gui/plugins/wato/check_mk_configuration.py
index dd8af81..5a7eaef 100644
--- a/cmk/gui/plugins/wato/check_mk_configuration.py
+++ b/cmk/gui/plugins/wato/check_mk_configuration.py
@@ -639,7 +639,7 @@ register_configvar(group,
totext = _("%d translations"),
),
forth = lambda d: sorted(d.items()),
- back = lambda l: dict(l),
+ back = dict,
),
domain = "multisite",
)
@@ -718,7 +718,7 @@ register_configvar(group,
totext = _("%d icons and actions"),
),
forth = lambda d: sorted(d.items()),
- back = lambda l: dict(l),
+ back = dict,
),
domain = "multisite",
)
@@ -809,7 +809,7 @@ register_configvar(group,
"change the sorting of the icons."),
),
forth = lambda d: sorted(d.items()),
- back = lambda l: dict(l),
+ back = dict,
),
domain = "multisite",
)
@@ -1929,7 +1929,7 @@ register_rule(group,
default_value = 120.0,
label = _("Interval:"),
unit = _("minutes")),
- forth = lambda x: float(x),
+ forth = float,
),
title = _("Periodic notifications during host problems"),
help = _("If you enable periodic notifications, then during a problem state
"
@@ -1952,7 +1952,7 @@ register_rule(group,
default_value = 120.0,
label = _("Interval:"),
unit = _("minutes")),
- forth = lambda x: float(x),
+ forth = float,
),
title = _("Periodic notifications during service problems"),
help = _("If you enable periodic notifications, then during a problem state
"
diff --git a/cmk/gui/plugins/wato/check_parameters.py
b/cmk/gui/plugins/wato/check_parameters.py
index 8411166..f67a48c 100644
--- a/cmk/gui/plugins/wato/check_parameters.py
+++ b/cmk/gui/plugins/wato/check_parameters.py
@@ -12077,8 +12077,8 @@ vs_elements_if_groups_matches = [
choices = defines.interface_port_types(),
help = _("Only interfaces with the given port type are put into this
group. "
"For example 53 (propVirtual)."),
- ), forth = lambda x: str(x),
- back = lambda x: int(x),
+ ), forth = str,
+ back = int,
)),
("items", ListOfStrings(
title = _("Restrict interface items"),
diff --git a/cmk/gui/wato/__init__.py b/cmk/gui/wato/__init__.py
index 3b04fa0..055e2bc 100644
--- a/cmk/gui/wato/__init__.py
+++ b/cmk/gui/wato/__init__.py
@@ -16564,7 +16564,8 @@ def configure_attributes(new, hosts, for_what, parent,
myself=None, without_attr
active = False
if not new and (not attr.editable() or not attr.may_edit()):
- if active:
+ # Bug in pylint 1.9.2
https://github.com/PyCQA/pylint/issues/1984,
already fixed in master.
+ if active: # pylint: disable=simplifiable-if-statement
force_entry = True
else:
disabled = True