aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/fields.py
diff options
context:
space:
mode:
authorTom Christie2014-08-19 13:54:52 +0100
committerTom Christie2014-08-19 13:54:52 +0100
commitd2795dd26d7483ea0de119ae135eab0a94cf23d8 (patch)
tree218df2d9c5fc3db3626974b8f7424e80b92641c8 /rest_framework/fields.py
parent19f31340627c949ca07a9e7b59299734fd991f75 (diff)
downloaddjango-rest-framework-d2795dd26d7483ea0de119ae135eab0a94cf23d8.tar.bz2
Resolve linting issues
Diffstat (limited to 'rest_framework/fields.py')
-rw-r--r--rest_framework/fields.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/rest_framework/fields.py b/rest_framework/fields.py
index 43a74ae6..85fcbd96 100644
--- a/rest_framework/fields.py
+++ b/rest_framework/fields.py
@@ -63,8 +63,10 @@ def get_component(obj, attr_name):
def readable_datetime_formats(formats):
- format = ', '.join(formats).replace(ISO_8601,
- 'YYYY-MM-DDThh:mm[:ss[.uuuuuu]][+HH:MM|-HH:MM|Z]')
+ format = ', '.join(formats).replace(
+ ISO_8601,
+ 'YYYY-MM-DDThh:mm[:ss[.uuuuuu]][+HH:MM|-HH:MM|Z]'
+ )
return humanize_strptime(format)
@@ -425,7 +427,7 @@ class ModelField(WritableField):
}
-##### Typed Fields #####
+# Typed Fields
class BooleanField(WritableField):
type_name = 'BooleanField'
@@ -484,7 +486,7 @@ class URLField(CharField):
type_label = 'url'
def __init__(self, **kwargs):
- if not 'validators' in kwargs:
+ if 'validators' not in kwargs:
kwargs['validators'] = [validators.URLValidator()]
super(URLField, self).__init__(**kwargs)