Skip to content

Commit 7eb7900

Browse files
committed
Add package/module docstrings
1 parent 3c0d17c commit 7eb7900

File tree

5 files changed

+42
-11
lines changed

5 files changed

+42
-11
lines changed

rest_framework/schemas/__init__.py

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,25 @@
1-
# We expose a minimal "public" API directly from `schemas`. This covers the
2-
# basic use-cases:
3-
#
4-
# from rest_framework.schemas import (
5-
# AutoSchema,
6-
# ManualSchema,
7-
# get_schema_view,
8-
# SchemaGenerator,
9-
# )
10-
#
11-
# Other access should target the submodules directly
1+
"""
2+
rest_framework.schemas
3+
4+
schemas:
5+
__init__.py
6+
generators.py # Top-down schema generation
7+
inspectors.py # Per-endpoint view introspection
8+
utils.py # Shared helper functions
9+
views.py # Houses `SchemaView`, `APIView` subclass.
10+
11+
We expose a minimal "public" API directly from `schemas`. This covers the
12+
basic use-cases:
13+
14+
from rest_framework.schemas import (
15+
AutoSchema,
16+
ManualSchema,
17+
get_schema_view,
18+
SchemaGenerator,
19+
)
20+
21+
Other access should target the submodules directly
22+
"""
1223
from .generators import SchemaGenerator
1324
from .inspectors import AutoSchema, ManualSchema # noqa
1425

rest_framework/schemas/generators.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
"""
2+
generators.py # Top-down schema generation
3+
4+
See schemas.__init__.py for package overview.
5+
"""
16
from collections import OrderedDict
27
from importlib import import_module
38

rest_framework/schemas/inspectors.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
"""
2+
inspectors.py # Per-endpoint view introspection
3+
4+
See schemas.__init__.py for package overview.
5+
"""
16
import re
27
from collections import OrderedDict
38

rest_framework/schemas/utils.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
"""
2+
utils.py # Shared helper functions
3+
4+
See schemas.__init__.py for package overview.
5+
"""
16

27

38
def is_list_view(path, method, view):

rest_framework/schemas/views.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
"""
2+
views.py # Houses `SchemaView`, `APIView` subclass.
3+
4+
See schemas.__init__.py for package overview.
5+
"""
16
from rest_framework import exceptions, renderers
27
from rest_framework.response import Response
38
from rest_framework.settings import api_settings

0 commit comments

Comments
 (0)