mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-01 19:10:12 +03:00
Change backslash to multiline strings
This commit is contained in:
parent
7399962c9f
commit
c95cb59657
|
@ -163,8 +163,10 @@ class ViewInspector(object):
|
||||||
@property
|
@property
|
||||||
def view(self):
|
def view(self):
|
||||||
"""View property."""
|
"""View property."""
|
||||||
assert self._view is not None, "Schema generation REQUIRES a view instance. (Hint: you accessed `schema` from "\
|
assert self._view is not None, (
|
||||||
"the view class rather than an instance.) "
|
"Schema generation REQUIRES a view instance. (Hint: you accessed `schema` from "
|
||||||
|
"the view class rather than an instance.) "
|
||||||
|
)
|
||||||
return self._view
|
return self._view
|
||||||
|
|
||||||
@view.setter
|
@view.setter
|
||||||
|
@ -499,8 +501,9 @@ class DefaultSchema(ViewInspector):
|
||||||
return result
|
return result
|
||||||
|
|
||||||
inspector_class = api_settings.DEFAULT_SCHEMA_CLASS
|
inspector_class = api_settings.DEFAULT_SCHEMA_CLASS
|
||||||
assert issubclass(inspector_class, ViewInspector), \
|
assert issubclass(inspector_class, ViewInspector), (
|
||||||
"DEFAULT_SCHEMA_CLASS must be set to a ViewInspector (usually an AutoSchema) subclass"
|
"DEFAULT_SCHEMA_CLASS must be set to a ViewInspector (usually an AutoSchema) subclass"
|
||||||
|
)
|
||||||
inspector = inspector_class()
|
inspector = inspector_class()
|
||||||
inspector.view = instance
|
inspector.view = instance
|
||||||
return inspector
|
return inspector
|
||||||
|
|
Loading…
Reference in New Issue
Block a user