mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-06 05:20:12 +03:00
remove unused import
This commit is contained in:
parent
49ad4750c6
commit
e3169de5cd
|
@ -197,13 +197,20 @@ class APISettings(object):
|
||||||
and (not issubclass(default.__class__, Iterable)
|
and (not issubclass(default.__class__, Iterable)
|
||||||
or isinstance(val, six.string_types)):
|
or isinstance(val, six.string_types)):
|
||||||
raise ImproperlyConfigured(
|
raise ImproperlyConfigured(
|
||||||
'The "{attr}" setting must be a list or a tuple'
|
'The "{settings_key}" setting must be a list or tuple, but '
|
||||||
.format(attr=attr)
|
'got type "{type_name}" with value "{value}".'.format(
|
||||||
|
settings_key=attr, type_name=val.__class__.__name__,
|
||||||
|
value=val
|
||||||
|
)
|
||||||
)
|
)
|
||||||
elif isinstance(default, six.string_types) and not \
|
elif isinstance(default, six.string_types) and not \
|
||||||
isinstance(val, six.string_types):
|
isinstance(val, six.string_types):
|
||||||
raise ImproperlyConfigured(
|
raise ImproperlyConfigured(
|
||||||
'The "{attr}" setting must be a string'.format(attr=attr)
|
'The "{settings_key}" setting must be a string, but '
|
||||||
|
'got type "{type_name}" with value "{value}".'.format(
|
||||||
|
settings_key=attr, type_name=val.__class__.__name__,
|
||||||
|
value=val
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
# Coerce import strings into classes
|
# Coerce import strings into classes
|
||||||
|
|
Loading…
Reference in New Issue
Block a user