From 906c7198630e727065eb66da22e6c30e9e218a37 Mon Sep 17 00:00:00 2001 From: Raymond Kuiper Date: Tue, 24 Jun 2025 15:16:39 +0200 Subject: [PATCH] corrected linting errors --- modules/device.py | 2 +- modules/hostgroups.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/device.py b/modules/device.py index 472384c..524be55 100644 --- a/modules/device.py +++ b/modules/device.py @@ -138,7 +138,7 @@ class PhysicalDevice: # Remove duplicates and None values self.hostgroups = list(filter(None, list(set(self.hostgroups)))) if self.hostgroups: - self.logger.debug(f"Host {self.name}: Should be member " + self.logger.debug(f"Host {self.name}: Should be member " f"of groups: {self.hostgroups}") return True return False diff --git a/modules/hostgroups.py b/modules/hostgroups.py index cad31e1..f98c09b 100644 --- a/modules/hostgroups.py +++ b/modules/hostgroups.py @@ -11,6 +11,7 @@ class Hostgroup: Takes type (vm or dev) and NB object""" # pylint: disable=too-many-arguments, disable=too-many-positional-arguments + # pylint: disable=logging-fstring-interpolation def __init__( self, obj_type, @@ -93,7 +94,8 @@ class Hostgroup: format_options["cluster"] = self.nb.cluster.name format_options["cluster_type"] = self.nb.cluster.type.name self.format_options = format_options - self.logger.debug(f"Host {self.name}: Resolved properties for use in hostgroups: {self.format_options}") + self.logger.debug(f"Host {self.name}: Resolved properties for use " + f"in hostgroups: {self.format_options}") def set_nesting( self, nested_sitegroup_flag, nested_region_flag, nb_groups, nb_regions @@ -142,7 +144,7 @@ class Hostgroup: if bool(hg_output): return "/".join(hg_output) msg = ( - f"Host {self.name}: Generating hostgroup name for '{hg_format}' failed. " + f"Host {self.name}: Generating hostgroup name for '{hg_format}' failed. " f"This is most likely due to fields that have no value." ) self.logger.warning(msg)