From 0c0b2efbe09f3b43d9711f5c7992ee7c8e84a585 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 15 May 2022 16:46:05 +0200 Subject: [PATCH 1/3] raise error --- InvenTree/plugin/base/label/mixins.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/InvenTree/plugin/base/label/mixins.py b/InvenTree/plugin/base/label/mixins.py index b6c4d53f46..4e06f9e15a 100644 --- a/InvenTree/plugin/base/label/mixins.py +++ b/InvenTree/plugin/base/label/mixins.py @@ -36,4 +36,4 @@ class LabelPrintingMixin: """ # Unimplemented (to be implemented by the particular plugin class) - MixinNotImplementedError('This Plugin must implement a `print_label` method') + raise MixinNotImplementedError('This Plugin must implement a `print_label` method') From 076098a0e0a5ddc38d487590fffe12ce621b4982 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 15 May 2022 16:50:17 +0200 Subject: [PATCH 2/3] use static reference this is stupid but is required --- InvenTree/plugin/__init__.py | 2 +- InvenTree/plugin/events.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/InvenTree/plugin/__init__.py b/InvenTree/plugin/__init__.py index ae38ae6e5b..2f08d31eed 100644 --- a/InvenTree/plugin/__init__.py +++ b/InvenTree/plugin/__init__.py @@ -10,7 +10,7 @@ __all__ = [ 'registry', 'InvenTreePlugin', - IntegrationPluginBase, + 'IntegrationPluginBase', 'MixinNotImplementedError', 'MixinImplementationError', ] diff --git a/InvenTree/plugin/events.py b/InvenTree/plugin/events.py index 193a1805fe..bea1fafb25 100644 --- a/InvenTree/plugin/events.py +++ b/InvenTree/plugin/events.py @@ -5,5 +5,5 @@ Import helper for events from plugin.base.event.events import trigger_event __all__ = [ - trigger_event, + 'trigger_event', ] From ca0508f2f0cf1a98bc0267c4c9f11946b89db957 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 15 May 2022 17:22:58 +0200 Subject: [PATCH 3/3] update to https to match hotspots --- InvenTree/plugin/test_plugin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/InvenTree/plugin/test_plugin.py b/InvenTree/plugin/test_plugin.py index 30054d569b..5de813150f 100644 --- a/InvenTree/plugin/test_plugin.py +++ b/InvenTree/plugin/test_plugin.py @@ -87,7 +87,7 @@ class InvenTreePluginTests(TestCase): AUTHOR = 'AA BB' DESCRIPTION = 'A description' VERSION = '1.2.3a' - WEBSITE = 'http://aa.bb/cc' + WEBSITE = 'https://aa.bb/cc' LICENSE = 'MIT' self.plugin_name = NameInvenTreePlugin() @@ -147,7 +147,7 @@ class InvenTreePluginTests(TestCase): # website self.assertEqual(self.plugin.website, None) self.assertEqual(self.plugin_simple.website, None) - self.assertEqual(self.plugin_name.website, 'http://aa.bb/cc') + self.assertEqual(self.plugin_name.website, 'https://aa.bb/cc') # license self.assertEqual(self.plugin.license, None)