Skip to content

Commit 9412ed1

Browse files
committed
More pep8
1 parent 99bd5b0 commit 9412ed1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

rest_framework/pagination.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,7 @@ def paginate_queryset(self, queryset, request, view=None):
658658
for i in range(len(ordering)):
659659
# The first operands need to be equals
660660
# the last operands need to be gt
661-
equals = list(ordering[:i+2])
661+
equals = list(ordering[:i + 2])
662662
greater_than_q = q_objects_compare[equals.pop()]
663663
sub_filters = [q_objects_equals[e] for e in equals]
664664
sub_filters.append(greater_than_q)

tests/test_pagination.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import pytest
2-
import json
32
import re
43
import operator
54

@@ -13,6 +12,7 @@
1312
from rest_framework import (
1413
exceptions, filters, generics, pagination, serializers, status
1514
)
15+
from rest_framework.utils import json
1616
from rest_framework.pagination import PAGE_BREAK, PageLink
1717
from rest_framework.request import Request
1818
from rest_framework.test import APIRequestFactory

0 commit comments

Comments
 (0)