mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-29 20:16:44 +00:00
PEP fixes
This commit is contained in:
parent
e80a71eb46
commit
7d160039b1
@ -21,6 +21,7 @@ from .status import is_worker_running
|
|||||||
|
|
||||||
from plugin import plugin_registry
|
from plugin import plugin_registry
|
||||||
|
|
||||||
|
|
||||||
class InfoView(AjaxView):
|
class InfoView(AjaxView):
|
||||||
""" Simple JSON endpoint for InvenTree information.
|
""" Simple JSON endpoint for InvenTree information.
|
||||||
Use to confirm that the server is running, etc.
|
Use to confirm that the server is running, etc.
|
||||||
|
@ -7,6 +7,7 @@ import plugin.integration
|
|||||||
|
|
||||||
hash_barcode = mixin.hash_barcode
|
hash_barcode = mixin.hash_barcode
|
||||||
|
|
||||||
|
|
||||||
class BarcodePlugin(mixin.BarcodeMixin, plugin.integration.IntegrationPluginBase):
|
class BarcodePlugin(mixin.BarcodeMixin, plugin.integration.IntegrationPluginBase):
|
||||||
"""
|
"""
|
||||||
Legacy barcode plugin definition - will be replaced
|
Legacy barcode plugin definition - will be replaced
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
Plugin mixin classes for action plugin
|
Plugin mixin classes for action plugin
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
class ActionMixin:
|
class ActionMixin:
|
||||||
"""
|
"""
|
||||||
Mixin that enables custom actions
|
Mixin that enables custom actions
|
||||||
|
@ -63,7 +63,6 @@ class BarcodeMixin:
|
|||||||
|
|
||||||
self.data = barcode_data
|
self.data = barcode_data
|
||||||
|
|
||||||
|
|
||||||
def getStockItem(self):
|
def getStockItem(self):
|
||||||
"""
|
"""
|
||||||
Attempt to retrieve a StockItem associated with this barcode.
|
Attempt to retrieve a StockItem associated with this barcode.
|
||||||
|
@ -185,6 +185,7 @@ class PluginsRegistry:
|
|||||||
logger.info(f'Collected {len(self.plugin_modules)} plugins!')
|
logger.info(f'Collected {len(self.plugin_modules)} plugins!')
|
||||||
logger.info(", ".join([a.__module__ for a in self.plugin_modules]))
|
logger.info(", ".join([a.__module__ for a in self.plugin_modules]))
|
||||||
# endregion
|
# endregion
|
||||||
|
|
||||||
# region registry functions
|
# region registry functions
|
||||||
def with_mixin(self, mixin: str):
|
def with_mixin(self, mixin: str):
|
||||||
"""
|
"""
|
||||||
@ -544,4 +545,5 @@ class PluginsRegistry:
|
|||||||
get_plugin_error(error, do_raise=True)
|
get_plugin_error(error, do_raise=True)
|
||||||
# endregion
|
# endregion
|
||||||
|
|
||||||
|
|
||||||
plugin_registry = PluginsRegistry()
|
plugin_registry = PluginsRegistry()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user