Skip to content

Commit

Permalink
Add package/module docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
carltongibson committed Sep 14, 2017
1 parent a7b2f50 commit a958a3e
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 11 deletions.
33 changes: 22 additions & 11 deletions rest_framework/schemas/__init__.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down
5 changes: 5 additions & 0 deletions rest_framework/schemas/generators.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down
5 changes: 5 additions & 0 deletions rest_framework/schemas/inspectors.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
"""
inspectors.py # Per-endpoint view introspection
See schemas.__init__.py for package overview.
"""
import re
from collections import OrderedDict

Expand Down
5 changes: 5 additions & 0 deletions rest_framework/schemas/utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
"""
utils.py # Shared helper functions
See schemas.__init__.py for package overview.
"""


def is_list_view(path, method, view):
Expand Down
5 changes: 5 additions & 0 deletions rest_framework/schemas/views.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit a958a3e

Please sign in to comment.