Commit 42effe0f authored by Arkadiusz Hiler's avatar Arkadiusz Hiler
Browse files

Massage code to adhere to PEP-8


Signed-off-by: default avatarArkadiusz Hiler <arkadiusz.hiler@intel.com>
parent bb22eeba
Pipeline #72431 passed with stage
in 2 minutes and 38 seconds
......@@ -47,7 +47,6 @@ from django_filters.rest_framework import DjangoFilterBackend
import django_filters
API_REVISION = 4
......@@ -70,7 +69,8 @@ class RelatedOrderingFilter(filters.OrderingFilter):
# foreign key
if field.remote_field and len(components) == 2:
return self.is_valid_field(field.remote_field.model, components[1])
return self.is_valid_field(field.remote_field.model,
components[1])
return True
except FieldDoesNotExist:
return False
......@@ -624,7 +624,8 @@ class EventFilter(django_filters.FilterSet):
names = event_names.split(',')
return queryset.filter(event__name__in=names)
since = django_filters.CharFilter(field_name='event_time', lookup_expr='gt')
since = django_filters.CharFilter(field_name='event_time',
lookup_expr='gt')
name = django_filters.CharFilter(method='filter_name')
series = django_filters.NumberFilter()
patch = django_filters.NumberFilter()
......
......@@ -61,7 +61,6 @@ class PatchworkXMLRPCDispatcher(SimpleXMLRPCDispatcher,
# map of name => (auth, func)
self.func_map = {}
def register_function(self, fn, auth_required):
self.funcs[fn.__name__] = fn # needed by superclass methods
self.func_map[fn.__name__] = (auth_required, fn)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment