@@ -163,7 +163,10 @@ def __set__(self, instance, other):
163
163
@property
164
164
def view (self ):
165
165
"""View property."""
166
- assert self ._view is not None , "Schema generation REQUIRES a view instance. (Hint: you accessed `schema` from the view class rather than an instance.)"
166
+ assert self ._view is not None , (
167
+ "Schema generation REQUIRES a view instance. (Hint: you accessed "
168
+ "`schema` from the view class rather than an instance.)"
169
+ )
167
170
return self ._view
168
171
169
172
@view .setter
@@ -193,7 +196,7 @@ class AutoSchema(ViewInspector):
193
196
"""
194
197
Default inspector for APIView
195
198
196
- Responsible for per-view instrospection and schema generation.
199
+ Responsible for per-view introspection and schema generation.
197
200
"""
198
201
def __init__ (self , manual_fields = None ):
199
202
"""
@@ -468,7 +471,7 @@ def __init__(self, fields, description='', encoding=None):
468
471
Parameters:
469
472
470
473
* `fields`: list of `coreapi.Field` instances.
471
- * `descripton `: String description for view. Optional.
474
+ * `description `: String description for view. Optional.
472
475
"""
473
476
super (ManualSchema , self ).__init__ ()
474
477
assert all (isinstance (f , coreapi .Field ) for f in fields ), "`fields` must be a list of coreapi.Field instances"
@@ -498,7 +501,9 @@ def __get__(self, instance, owner):
498
501
return result
499
502
500
503
inspector_class = api_settings .DEFAULT_SCHEMA_CLASS
501
- assert issubclass (inspector_class , ViewInspector ), "DEFAULT_SCHEMA_CLASS must be set to a ViewInspector (usually an AutoSchema) subclass"
504
+ assert issubclass (inspector_class , ViewInspector ), (
505
+ "DEFAULT_SCHEMA_CLASS must be set to a ViewInspector (usually an AutoSchema) subclass"
506
+ )
502
507
inspector = inspector_class ()
503
508
inspector .view = instance
504
509
return inspector
0 commit comments