remove unused module docstrings

This commit is contained in:
David Lord 2020-04-04 12:28:08 -07:00
parent cd8a374504
commit f2f027d1fb
No known key found for this signature in database
GPG key ID: 7A1C87E3F5BC42A8
37 changed files with 15 additions and 331 deletions

View file

@ -1,15 +1,3 @@
"""
flask
~~~~~
A microframework based on Werkzeug. It's extensively documented
and follows best practice patterns.
:copyright: 2010 Pallets
:license: BSD-3-Clause
"""
# utilities we import from Werkzeug and Jinja2 that are unused
# in the module but are exported as public interface.
from jinja2 import escape
from jinja2 import Markup
from werkzeug.exceptions import abort

View file

@ -1,14 +1,3 @@
"""
flask.__main__
~~~~~~~~~~~~~~
Alias for flask.run for the command line.
:copyright: 2010 Pallets
:license: BSD-3-Clause
"""
if __name__ == "__main__":
from .cli import main
main(as_module=True)

View file

@ -1,12 +1,3 @@
"""
flask.app
~~~~~~~~~
This module implements the central WSGI application object.
:copyright: 2010 Pallets
:license: BSD-3-Clause
"""
import os
import sys
from datetime import timedelta

View file

@ -1,13 +1,3 @@
"""
flask.blueprints
~~~~~~~~~~~~~~~~
Blueprints are the recommended way to implement larger or more
pluggable applications in Flask 0.7 and later.
:copyright: 2010 Pallets
:license: BSD-3-Clause
"""
from functools import update_wrapper
from .helpers import _endpoint_from_view_func

View file

@ -1,12 +1,3 @@
"""
flask.cli
~~~~~~~~~
A simple command line application to run flask apps.
:copyright: 2010 Pallets
:license: BSD-3-Clause
"""
import ast
import inspect
import os

View file

@ -1,12 +1,3 @@
"""
flask.config
~~~~~~~~~~~~
Implements the configuration related objects.
:copyright: 2010 Pallets
:license: BSD-3-Clause
"""
import errno
import os
import types

View file

@ -1,12 +1,3 @@
"""
flask.ctx
~~~~~~~~~
Implements the objects required to keep the context.
:copyright: 2010 Pallets
:license: BSD-3-Clause
"""
import sys
from functools import update_wrapper

View file

@ -1,12 +1,3 @@
"""
flask.debughelpers
~~~~~~~~~~~~~~~~~~
Various helpers to make the development experience better.
:copyright: 2010 Pallets
:license: BSD-3-Clause
"""
import os
from warnings import warn

View file

@ -1,13 +1,3 @@
"""
flask.globals
~~~~~~~~~~~~~
Defines all the global objects that are proxies to the current
active context.
:copyright: 2010 Pallets
:license: BSD-3-Clause
"""
from functools import partial
from werkzeug.local import LocalProxy

View file

@ -1,12 +1,3 @@
"""
flask.helpers
~~~~~~~~~~~~~
Implements various helpers.
:copyright: 2010 Pallets
:license: BSD-3-Clause
"""
import io
import mimetypes
import os

View file

@ -1,10 +1,3 @@
"""
flask.json
~~~~~~~~~~
:copyright: 2010 Pallets
:license: BSD-3-Clause
"""
import codecs
import io
import uuid

View file

@ -2,10 +2,10 @@
Tagged JSON
~~~~~~~~~~~
A compact representation for lossless serialization of non-standard JSON types.
:class:`~flask.sessions.SecureCookieSessionInterface` uses this to serialize
the session data, but it may be useful in other places. It can be extended to
support other types.
A compact representation for lossless serialization of non-standard JSON
types. :class:`~flask.sessions.SecureCookieSessionInterface` uses this
to serialize the session data, but it may be useful in other places. It
can be extended to support other types.
.. autoclass:: TaggedJSONSerializer
:members:
@ -13,12 +13,15 @@ support other types.
.. autoclass:: JSONTag
:members:
Let's seen an example that adds support for :class:`~collections.OrderedDict`.
Dicts don't have an order in Python or JSON, so to handle this we will dump
the items as a list of ``[key, value]`` pairs. Subclass :class:`JSONTag` and
give it the new key ``' od'`` to identify the type. The session serializer
processes dicts first, so insert the new tag at the front of the order since
``OrderedDict`` must be processed before ``dict``. ::
Let's see an example that adds support for
:class:`~collections.OrderedDict`. Dicts don't have an order in JSON, so
to handle this we will dump the items as a list of ``[key, value]``
pairs. Subclass :class:`JSONTag` and give it the new key ``' od'`` to
identify the type. The session serializer processes dicts first, so
insert the new tag at the front of the order since ``OrderedDict`` must
be processed before ``dict``.
.. code-block:: python
from flask.json.tag import JSONTag
@ -36,9 +39,6 @@ processes dicts first, so insert the new tag at the front of the order since
return OrderedDict(value)
app.session_interface.serializer.register(TagOrderedDict, index=0)
:copyright: 2010 Pallets
:license: BSD-3-Clause
"""
from base64 import b64decode
from base64 import b64encode

View file

@ -1,10 +1,3 @@
"""
flask.logging
~~~~~~~~~~~~~
:copyright: 2010 Pallets
:license: BSD-3-Clause
"""
import logging
import sys

View file

@ -1,12 +1,3 @@
"""
flask.sessions
~~~~~~~~~~~~~~
Implements cookie based sessions based on itsdangerous.
:copyright: 2010 Pallets
:license: BSD-3-Clause
"""
import hashlib
import warnings
from collections.abc import MutableMapping

View file

@ -1,13 +1,3 @@
"""
flask.signals
~~~~~~~~~~~~~
Implements signals based on blinker if available, otherwise
falls silently back to a noop.
:copyright: 2010 Pallets
:license: BSD-3-Clause
"""
try:
from blinker import Namespace

View file

@ -1,12 +1,3 @@
"""
flask.templating
~~~~~~~~~~~~~~~~
Implements the bridge to Jinja2.
:copyright: 2010 Pallets
:license: BSD-3-Clause
"""
from jinja2 import BaseLoader
from jinja2 import Environment as BaseEnvironment
from jinja2 import TemplateNotFound

View file

@ -1,13 +1,3 @@
"""
flask.testing
~~~~~~~~~~~~~
Implements test support helpers. This module is lazily imported
and usually not used in production environments.
:copyright: 2010 Pallets
:license: BSD-3-Clause
"""
from contextlib import contextmanager
import werkzeug.test

View file

@ -1,12 +1,3 @@
"""
flask.views
~~~~~~~~~~~
This module provides class-based views inspired by the ones in Django.
:copyright: 2010 Pallets
:license: BSD-3-Clause
"""
from .globals import request

View file

@ -1,12 +1,3 @@
"""
flask.wrappers
~~~~~~~~~~~~~~
Implements the WSGI wrappers (request and response).
:copyright: 2010 Pallets
:license: BSD-3-Clause
"""
from werkzeug.exceptions import BadRequest
from werkzeug.wrappers import Request as RequestBase
from werkzeug.wrappers import Response as ResponseBase

View file

@ -1,10 +1,3 @@
"""
tests.conftest
~~~~~~~~~~~~~~
:copyright: 2010 Pallets
:license: BSD-3-Clause
"""
import os
import pkgutil
import sys

View file

@ -1,12 +1,3 @@
"""
tests.appctx
~~~~~~~~~~~~
Tests the application context.
:copyright: 2010 Pallets
:license: BSD-3-Clause
"""
import pytest
import flask

View file

@ -1,12 +1,3 @@
"""
tests.basic
~~~~~~~~~~~~~~~~~~~~~
The basic functionality.
:copyright: 2010 Pallets
:license: BSD-3-Clause
"""
import re
import sys
import time

View file

@ -1,12 +1,3 @@
"""
tests.blueprints
~~~~~~~~~~~~~~~~
Blueprints (and currently modules)
:copyright: 2010 Pallets
:license: BSD-3-Clause
"""
import functools
import pytest

View file

@ -1,10 +1,3 @@
"""
tests.test_cli
~~~~~~~~~~~~~~
:copyright: 2010 Pallets
:license: BSD-3-Clause
"""
# This file was part of Flask-CLI and was modified under the terms of
# its Revised BSD License. Copyright © 2015 CERN.
import os

View file

@ -1,10 +1,3 @@
"""
tests.test_config
~~~~~~~~~~~~~~~~~
:copyright: 2010 Pallets
:license: BSD-3-Clause
"""
import json
import os
import textwrap

View file

@ -1,12 +1,3 @@
"""
tests.helpers
~~~~~~~~~~~~~~~~~~~~~~~
Various helpers.
:copyright: 2010 Pallets
:license: BSD-3-Clause
"""
import datetime
import io
import os

View file

@ -1,10 +1,3 @@
"""
tests.test_instance
~~~~~~~~~~~~~~~~~~~
:copyright: 2010 Pallets
:license: BSD-3-Clause
"""
import os
import sys

View file

@ -1,10 +1,3 @@
"""
tests.test_json_tag
~~~~~~~~~~~~~~~~~~~
:copyright: 2010 Pallets
:license: BSD-3-Clause
"""
from datetime import datetime
from uuid import uuid4

View file

@ -1,10 +1,3 @@
"""
tests.test_logging
~~~~~~~~~~~~~~~~~~~
:copyright: 2010 Pallets
:license: BSD-3-Clause
"""
import logging
import sys
from io import StringIO

View file

@ -1,12 +1,3 @@
"""
tests.regression
~~~~~~~~~~~~~~~~~~~~~~~~~~
Tests regressions.
:copyright: 2010 Pallets
:license: BSD-3-Clause
"""
import gc
import platform
import threading

View file

@ -1,12 +1,3 @@
"""
tests.reqctx
~~~~~~~~~~~~
Tests the request context.
:copyright: 2010 Pallets
:license: BSD-3-Clause
"""
import pytest
import flask

View file

@ -1,12 +1,3 @@
"""
tests.signals
~~~~~~~~~~~~~~~~~~~~~~~
Signalling.
:copyright: 2010 Pallets
:license: BSD-3-Clause
"""
import pytest
try:

View file

@ -1,13 +1,3 @@
"""
tests.subclassing
~~~~~~~~~~~~~~~~~
Test that certain behavior of flask can be customized by
subclasses.
:copyright: 2010 Pallets
:license: BSD-3-Clause
"""
from io import StringIO
import flask

View file

@ -1,12 +1,3 @@
"""
tests.templating
~~~~~~~~~~~~~~~~
Template functionality
:copyright: 2010 Pallets
:license: BSD-3-Clause
"""
import logging
import pytest

View file

@ -1,12 +1,3 @@
"""
tests.testing
~~~~~~~~~~~~~
Test client and more.
:copyright: 2010 Pallets
:license: BSD-3-Clause
"""
import click
import pytest
import werkzeug

View file

@ -1,10 +1,3 @@
"""
tests.test_user_error_handler
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: 2010 Pallets
:license: BSD-3-Clause
"""
import pytest
from werkzeug.exceptions import Forbidden
from werkzeug.exceptions import HTTPException

View file

@ -1,12 +1,3 @@
"""
tests.views
~~~~~~~~~~~
Pluggable views.
:copyright: 2010 Pallets
:license: BSD-3-Clause
"""
import pytest
from werkzeug.http import parse_set_header