mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-29 17:39:48 +03:00
More pep8
This commit is contained in:
parent
99bd5b0e1f
commit
9412ed16a1
|
@ -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)
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user