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: rest_framework.schemas
#
# from rest_framework.schemas import ( schemas:
# AutoSchema, __init__.py
# ManualSchema, generators.py # Top-down schema generation
# get_schema_view, inspectors.py # Per-endpoint view introspection
# SchemaGenerator, utils.py # Shared helper functions
# ) views.py # Houses `SchemaView`, `APIView` subclass.
#
# Other access should target the submodules directly 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 .generators import SchemaGenerator
from .inspectors import AutoSchema, ManualSchema # noqa 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 collections import OrderedDict
from importlib import import_module 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 import re
from collections import OrderedDict 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): 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 import exceptions, renderers
from rest_framework.response import Response from rest_framework.response import Response
from rest_framework.settings import api_settings from rest_framework.settings import api_settings