More pep8

This commit is contained in:
Rollo Konig Brock 2021-03-31 16:48:59 +01:00
parent 99bd5b0e1f
commit 9412ed16a1
2 changed files with 2 additions and 2 deletions

View File

@ -658,7 +658,7 @@ class CursorPagination(BasePagination):
for i in range(len(ordering)): for i in range(len(ordering)):
# The first operands need to be equals # The first operands need to be equals
# the last operands need to be gt # the last operands need to be gt
equals = list(ordering[:i+2]) equals = list(ordering[:i + 2])
greater_than_q = q_objects_compare[equals.pop()] greater_than_q = q_objects_compare[equals.pop()]
sub_filters = [q_objects_equals[e] for e in equals] sub_filters = [q_objects_equals[e] for e in equals]
sub_filters.append(greater_than_q) sub_filters.append(greater_than_q)

View File

@ -1,5 +1,4 @@
import pytest import pytest
import json
import re import re
import operator import operator
@ -13,6 +12,7 @@ from django.test import TestCase
from rest_framework import ( from rest_framework import (
exceptions, filters, generics, pagination, serializers, status exceptions, filters, generics, pagination, serializers, status
) )
from rest_framework.utils import json
from rest_framework.pagination import PAGE_BREAK, PageLink from rest_framework.pagination import PAGE_BREAK, PageLink
from rest_framework.request import Request from rest_framework.request import Request
from rest_framework.test import APIRequestFactory from rest_framework.test import APIRequestFactory