Skip to content

Commit da63f5e

Browse files
committed
Adding flake8 corrections
1 parent 15351af commit da63f5e

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

rest_framework/utils/encoders.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
import datetime
77
import decimal
88
import json
9-
from json.encoder import (FLOAT_REPR, INFINITY, c_make_encoder,
10-
encode_basestring_ascii, encode_basestring,
11-
_make_iterencode)
129
import uuid
10+
from json.encoder import (FLOAT_REPR, INFINITY, _make_iterencode,
11+
c_make_encoder, encode_basestring,
12+
encode_basestring_ascii)
1313

1414
from django.db.models.query import QuerySet
1515
from django.utils import six, timezone
@@ -55,7 +55,7 @@ def _encoder(o, _orig_encoder=_encoder, _encoding=self.encoding):
5555
return _orig_encoder(o)
5656

5757
def floatstr(o, allow_nan=self.allow_nan,
58-
_repr=FLOAT_REPR, _inf=INFINITY, _neginf=-INFINITY):
58+
_repr=FLOAT_REPR, _inf=INFINITY, _neginf=-INFINITY):
5959
# Check for specials. Note that this type of test is processor
6060
# and/or platform-specific, so do tests which don't depend on the
6161
# internals.
@@ -76,7 +76,6 @@ def floatstr(o, allow_nan=self.allow_nan,
7676

7777
return text
7878

79-
8079
if (_one_shot and c_make_encoder is not None
8180
and self.indent is None):
8281
_iterencode = c_make_encoder(
@@ -124,7 +123,7 @@ def default(self, obj):
124123
elif hasattr(obj, 'tolist'):
125124
# Numpy arrays and array scalars.
126125
return obj.tolist()
127-
elif (coreapi is not None) and isinstance(obj, (coreapi.Document,
126+
elif (coreapi is not None) and isinstance(obj, (coreapi.Document,
128127
coreapi.Error)):
129128
raise RuntimeError(
130129
'Cannot return a coreapi object from a JSON view. '

0 commit comments

Comments
 (0)