diff --git a/src/awx_plugins/inventory/plugins.py b/src/awx_plugins/inventory/plugins.py index 77cb93259c..5ae5ae94e3 100644 --- a/src/awx_plugins/inventory/plugins.py +++ b/src/awx_plugins/inventory/plugins.py @@ -31,17 +31,21 @@ class PluginFileInjector: def get_proper_name(cls) -> str | None: if cls.plugin_name is None: return None - return f'{cls.namespace}.{cls.collection}.{cls.plugin_name}.{cls.plugin_description}' + return f'{ + cls.namespace}.{ + cls.collection}.{ + cls.plugin_name}.{ + cls.plugin_description}' @property def filename(self) -> str: - '''Inventory filename for using the inventory plugin This is created - dynamically, but the auto plugin requires this exact naming.''' # noqa: DAR201; FIXME + """Inventory filename for using the inventory plugin This is created + dynamically, but the auto plugin requires this exact naming.""" # noqa: DAR201; FIXME return f'{self.plugin_name}.yml' def inventory_contents(self, inventory_update, private_data_dir): - '''Returns a string that is the content for the inventory file for the - inventory plugin.''' # noqa: DAR101, DAR201; FIXME + """Returns a string that is the content for the inventory file for the + inventory plugin.""" # noqa: DAR101, DAR201; FIXME return yaml.safe_dump( self.inventory_as_dict( inventory_update, @@ -53,19 +57,19 @@ def inventory_contents(self, inventory_update, private_data_dir): def inventory_as_dict(self, inventory_update, private_data_dir): source_vars = dict(inventory_update.source_vars_dict) # make a copy - '''None conveys that we should use the user-provided plugin. + """None conveys that we should use the user-provided plugin. Note that a plugin value of '' should still be overridden. - ''' + """ if self.plugin_name is not None: source_vars['plugin'] = ( f'''{ - self.namespace - }.{ - self.collection - }.{ - self.plugin_name - }''' + self.namespace + }.{ + self.collection + }.{ + self.plugin_name + }''' if self.use_fqcn else self.plugin_name ) @@ -95,7 +99,7 @@ def _get_shared_env( private_data_dir, private_data_files, ): # noqa: DAR101, DAR201; FIXME - '''By default, we will apply the standard managed injectors.''' + """By default, we will apply the standard managed injectors.""" if self.base_injector not in {'managed', 'template'}: return {} @@ -289,7 +293,7 @@ def get_plugin_env( class rhv(PluginFileInjector): - '''Ovirt uses the custom credential templating, and that is all.''' + """Ovirt uses the custom credential templating, and that is all.""" plugin_name = 'ovirt' plugin_description = 'Red Hat Virtualization' @@ -301,7 +305,7 @@ class rhv(PluginFileInjector): class rhv_supported(PluginFileInjector): - '''Ovirt uses the custom credential templating, and that is all.''' + """Ovirt uses the custom credential templating, and that is all.""" plugin_name = 'ovirt' plugin_description = 'Supported Red Hat Virtualization'