diff --git a/modules/interface.py b/modules/interface.py index 58c2b6b..a4139f5 100644 --- a/modules/interface.py +++ b/modules/interface.py @@ -31,7 +31,7 @@ class ZabbixInterface: zabbix = self.context["zabbix"] if "interface_type" in zabbix: self.interface["type"] = zabbix["interface_type"] - if not "interface_port" in zabbix: + if "interface_port" not in zabbix: self._set_default_port() return True self.interface["port"] = zabbix["interface_port"] diff --git a/modules/tools.py b/modules/tools.py index f612993..d0f7ce7 100644 --- a/modules/tools.py +++ b/modules/tools.py @@ -188,7 +188,7 @@ def sanatize_log_output(data): del sanitized_data["interfaceid"] # InterfaceID also hints that this is a interface update. # A check is required if there are no macro's used for SNMP security parameters. - if not "details" in data: + if "details" not in data: return sanitized_data for key, detail in sanitized_data["details"].items(): # If the detail is a secret, we don't want to log it. diff --git a/modules/usermacros.py b/modules/usermacros.py index c1ef92f..2631a40 100644 --- a/modules/usermacros.py +++ b/modules/usermacros.py @@ -57,7 +57,7 @@ class ZabbixUsermacros: if self.validate_macro(macro_name): macro["macro"] = str(macro_name) if isinstance(macro_properties, dict): - if not "value" in macro_properties: + if "value" not in macro_properties: self.logger.warning( f"Host {self.name}: Usermacro {macro_name} has " "no value in Netbox, skipping."