mirror of
https://github.com/TheNetworkGuy/netbox-zabbix-sync.git
synced 2025-07-13 15:24:48 -06:00
corrected linting errors
This commit is contained in:
parent
2a3d586302
commit
906c719863
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user