2
0
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:
Oliver Walters
2022-05-09 23:52:19 +10:00
parent 35fbb910e8
commit 6c0661a6f2
4 changed files with 13 additions and 11 deletions

View File

@ -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

View File

@ -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!
"""
...

View File

@ -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):
"""