mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-31 13:15:43 +00:00 
			
		
		
		
	PEP fixes
This commit is contained in:
		| @@ -469,7 +469,7 @@ class PluginSettingsApiTest(InvenTreeAPITestCase): | ||||
|         """List installed plugins via API""" | ||||
|         url = reverse('api-plugin-list') | ||||
|  | ||||
|         response = self.get(url, expected_code=200) | ||||
|         self.get(url, expected_code=200) | ||||
|  | ||||
|     def test_api_list(self): | ||||
|         """Test list URL""" | ||||
| @@ -479,7 +479,7 @@ class PluginSettingsApiTest(InvenTreeAPITestCase): | ||||
|  | ||||
|     def test_invalid_plugin_slug(self): | ||||
|         """Test that an invalid plugin slug returns a 404""" | ||||
|          | ||||
|  | ||||
|         url = reverse('api-plugin-setting-detail', kwargs={'plugin': 'doesnotexist', 'key': 'doesnotmatter'}) | ||||
|  | ||||
|         response = self.get(url, expected_code=404) | ||||
|   | ||||
| @@ -79,7 +79,7 @@ class LabelPrintMixin: | ||||
|             if config and config.active: | ||||
|                 # Only return the plugin if it is enabled! | ||||
|                 return plugin | ||||
|          | ||||
|  | ||||
|         # No matches found | ||||
|         return None | ||||
|  | ||||
|   | ||||
| @@ -147,7 +147,7 @@ class PluginSettingDetail(generics.RetrieveUpdateAPIView): | ||||
|  | ||||
|         if key not in settings: | ||||
|             raise NotFound(detail=f"Plugin '{plugin_slug}' has no setting matching '{key}'") | ||||
|          | ||||
|  | ||||
|         return PluginSetting.get_setting_object(key, plugin=plugin) | ||||
|  | ||||
|     # Staff permission required | ||||
|   | ||||
| @@ -71,7 +71,7 @@ class PluginsRegistry: | ||||
|         if slug not in self.plugins: | ||||
|             logger.warning(f"Plugin registry has no record of plugin '{slug}'") | ||||
|             return None | ||||
|          | ||||
|  | ||||
|         return self.plugins[slug] | ||||
|  | ||||
|     def call_plugin_function(self, slug, func, *args, **kwargs): | ||||
|   | ||||
		Reference in New Issue
	
	Block a user