Add package/module docstrings

This commit is contained in:
Carlton Gibson 2017-09-14 10:10:31 +02:00
parent a7b2f50ffe
commit a958a3e8bd
5 changed files with 42 additions and 11 deletions

View File

@ -1,14 +1,25 @@
# We expose a minimal "public" API directly from `schemas`. This covers the
# basic use-cases:
#
# from rest_framework.schemas import (
# AutoSchema,
# ManualSchema,
# get_schema_view,
# SchemaGenerator,
# )
#
# Other access should target the submodules directly
"""
rest_framework.schemas
schemas:
__init__.py
generators.py # Top-down schema generation
inspectors.py # Per-endpoint view introspection
utils.py # Shared helper functions
views.py # Houses `SchemaView`, `APIView` subclass.
We expose a minimal "public" API directly from `schemas`. This covers the
basic use-cases:
from rest_framework.schemas import (
AutoSchema,
ManualSchema,
get_schema_view,
SchemaGenerator,
)
Other access should target the submodules directly
"""
from .generators import SchemaGenerator
from .inspectors import AutoSchema, ManualSchema # noqa

View File

@ -1,3 +1,8 @@
"""
generators.py # Top-down schema generation
See schemas.__init__.py for package overview.
"""
from collections import OrderedDict
from importlib import import_module

View File

@ -1,3 +1,8 @@
"""
inspectors.py # Per-endpoint view introspection
See schemas.__init__.py for package overview.
"""
import re
from collections import OrderedDict

View File

@ -1,3 +1,8 @@
"""
utils.py # Shared helper functions
See schemas.__init__.py for package overview.
"""
def is_list_view(path, method, view):

View File

@ -1,3 +1,8 @@
"""
views.py # Houses `SchemaView`, `APIView` subclass.
See schemas.__init__.py for package overview.
"""
from rest_framework import exceptions, renderers
from rest_framework.response import Response
from rest_framework.settings import api_settings