mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-01 11:10:54 +00:00
PEP style fixes
This commit is contained in:
@ -47,7 +47,7 @@ class PluginList(generics.ListAPIView):
|
||||
for result in queryset:
|
||||
if mixin in result.mixins().keys():
|
||||
matches.append(result.pk)
|
||||
|
||||
|
||||
queryset = queryset.filter(pk__in=matches)
|
||||
|
||||
return queryset
|
||||
|
@ -453,11 +453,11 @@ class LocateMixin:
|
||||
|
||||
class MixinMeta:
|
||||
MIXIN_NAME = "Locate"
|
||||
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self.add_mixin('locate', True, __class__)
|
||||
|
||||
|
||||
def locate_stock_item(self, item_pk):
|
||||
"""
|
||||
Attempt to locate a particular StockItem
|
||||
@ -490,10 +490,10 @@ class LocateMixin:
|
||||
def locate_stock_location(self, location_pk):
|
||||
"""
|
||||
Attempt to location a particular StockLocation
|
||||
|
||||
|
||||
Arguments:
|
||||
location_pk: The PK (primary key) of the StockLocation to be located
|
||||
|
||||
|
||||
Note: The default implementation here does nothing!
|
||||
"""
|
||||
...
|
||||
|
@ -44,6 +44,7 @@ def mixin_enabled(plugin, key, *args, **kwargs):
|
||||
"""
|
||||
return plugin.mixin_enabled(key)
|
||||
|
||||
|
||||
@register.simple_tag()
|
||||
def mixin_available(mixin, *args, **kwargs):
|
||||
"""
|
||||
@ -51,6 +52,7 @@ def mixin_available(mixin, *args, **kwargs):
|
||||
"""
|
||||
return len(registry.with_mixin(mixin)) > 0
|
||||
|
||||
|
||||
@register.simple_tag()
|
||||
def navigation_enabled(*args, **kwargs):
|
||||
"""
|
||||
|
Reference in New Issue
Block a user