remove unused module docstrings
This commit is contained in:
parent
cd8a374504
commit
f2f027d1fb
37 changed files with 15 additions and 331 deletions
|
|
@ -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 escape
|
||||||
from jinja2 import Markup
|
from jinja2 import Markup
|
||||||
from werkzeug.exceptions import abort
|
from werkzeug.exceptions import abort
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,3 @@
|
||||||
"""
|
from .cli import main
|
||||||
flask.__main__
|
|
||||||
~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
Alias for flask.run for the command line.
|
main(as_module=True)
|
||||||
|
|
||||||
:copyright: 2010 Pallets
|
|
||||||
:license: BSD-3-Clause
|
|
||||||
"""
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
from .cli import main
|
|
||||||
|
|
||||||
main(as_module=True)
|
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,3 @@
|
||||||
"""
|
|
||||||
flask.app
|
|
||||||
~~~~~~~~~
|
|
||||||
|
|
||||||
This module implements the central WSGI application object.
|
|
||||||
|
|
||||||
:copyright: 2010 Pallets
|
|
||||||
:license: BSD-3-Clause
|
|
||||||
"""
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
|
|
|
||||||
|
|
@ -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 functools import update_wrapper
|
||||||
|
|
||||||
from .helpers import _endpoint_from_view_func
|
from .helpers import _endpoint_from_view_func
|
||||||
|
|
|
||||||
|
|
@ -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 ast
|
||||||
import inspect
|
import inspect
|
||||||
import os
|
import os
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,3 @@
|
||||||
"""
|
|
||||||
flask.config
|
|
||||||
~~~~~~~~~~~~
|
|
||||||
|
|
||||||
Implements the configuration related objects.
|
|
||||||
|
|
||||||
:copyright: 2010 Pallets
|
|
||||||
:license: BSD-3-Clause
|
|
||||||
"""
|
|
||||||
import errno
|
import errno
|
||||||
import os
|
import os
|
||||||
import types
|
import types
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,3 @@
|
||||||
"""
|
|
||||||
flask.ctx
|
|
||||||
~~~~~~~~~
|
|
||||||
|
|
||||||
Implements the objects required to keep the context.
|
|
||||||
|
|
||||||
:copyright: 2010 Pallets
|
|
||||||
:license: BSD-3-Clause
|
|
||||||
"""
|
|
||||||
import sys
|
import sys
|
||||||
from functools import update_wrapper
|
from functools import update_wrapper
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,3 @@
|
||||||
"""
|
|
||||||
flask.debughelpers
|
|
||||||
~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
Various helpers to make the development experience better.
|
|
||||||
|
|
||||||
:copyright: 2010 Pallets
|
|
||||||
:license: BSD-3-Clause
|
|
||||||
"""
|
|
||||||
import os
|
import os
|
||||||
from warnings import warn
|
from warnings import warn
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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 functools import partial
|
||||||
|
|
||||||
from werkzeug.local import LocalProxy
|
from werkzeug.local import LocalProxy
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,3 @@
|
||||||
"""
|
|
||||||
flask.helpers
|
|
||||||
~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
Implements various helpers.
|
|
||||||
|
|
||||||
:copyright: 2010 Pallets
|
|
||||||
:license: BSD-3-Clause
|
|
||||||
"""
|
|
||||||
import io
|
import io
|
||||||
import mimetypes
|
import mimetypes
|
||||||
import os
|
import os
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,3 @@
|
||||||
"""
|
|
||||||
flask.json
|
|
||||||
~~~~~~~~~~
|
|
||||||
|
|
||||||
:copyright: 2010 Pallets
|
|
||||||
:license: BSD-3-Clause
|
|
||||||
"""
|
|
||||||
import codecs
|
import codecs
|
||||||
import io
|
import io
|
||||||
import uuid
|
import uuid
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,10 @@
|
||||||
Tagged JSON
|
Tagged JSON
|
||||||
~~~~~~~~~~~
|
~~~~~~~~~~~
|
||||||
|
|
||||||
A compact representation for lossless serialization of non-standard JSON types.
|
A compact representation for lossless serialization of non-standard JSON
|
||||||
:class:`~flask.sessions.SecureCookieSessionInterface` uses this to serialize
|
types. :class:`~flask.sessions.SecureCookieSessionInterface` uses this
|
||||||
the session data, but it may be useful in other places. It can be extended to
|
to serialize the session data, but it may be useful in other places. It
|
||||||
support other types.
|
can be extended to support other types.
|
||||||
|
|
||||||
.. autoclass:: TaggedJSONSerializer
|
.. autoclass:: TaggedJSONSerializer
|
||||||
:members:
|
:members:
|
||||||
|
|
@ -13,12 +13,15 @@ support other types.
|
||||||
.. autoclass:: JSONTag
|
.. autoclass:: JSONTag
|
||||||
:members:
|
:members:
|
||||||
|
|
||||||
Let's seen an example that adds support for :class:`~collections.OrderedDict`.
|
Let's see an example that adds support for
|
||||||
Dicts don't have an order in Python or JSON, so to handle this we will dump
|
:class:`~collections.OrderedDict`. Dicts don't have an order in JSON, so
|
||||||
the items as a list of ``[key, value]`` pairs. Subclass :class:`JSONTag` and
|
to handle this we will dump the items as a list of ``[key, value]``
|
||||||
give it the new key ``' od'`` to identify the type. The session serializer
|
pairs. Subclass :class:`JSONTag` and give it the new key ``' od'`` to
|
||||||
processes dicts first, so insert the new tag at the front of the order since
|
identify the type. The session serializer processes dicts first, so
|
||||||
``OrderedDict`` must be processed before ``dict``. ::
|
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
|
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)
|
return OrderedDict(value)
|
||||||
|
|
||||||
app.session_interface.serializer.register(TagOrderedDict, index=0)
|
app.session_interface.serializer.register(TagOrderedDict, index=0)
|
||||||
|
|
||||||
:copyright: 2010 Pallets
|
|
||||||
:license: BSD-3-Clause
|
|
||||||
"""
|
"""
|
||||||
from base64 import b64decode
|
from base64 import b64decode
|
||||||
from base64 import b64encode
|
from base64 import b64encode
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,3 @@
|
||||||
"""
|
|
||||||
flask.logging
|
|
||||||
~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
:copyright: 2010 Pallets
|
|
||||||
:license: BSD-3-Clause
|
|
||||||
"""
|
|
||||||
import logging
|
import logging
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,3 @@
|
||||||
"""
|
|
||||||
flask.sessions
|
|
||||||
~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
Implements cookie based sessions based on itsdangerous.
|
|
||||||
|
|
||||||
:copyright: 2010 Pallets
|
|
||||||
:license: BSD-3-Clause
|
|
||||||
"""
|
|
||||||
import hashlib
|
import hashlib
|
||||||
import warnings
|
import warnings
|
||||||
from collections.abc import MutableMapping
|
from collections.abc import MutableMapping
|
||||||
|
|
|
||||||
|
|
@ -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:
|
try:
|
||||||
from blinker import Namespace
|
from blinker import Namespace
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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 BaseLoader
|
||||||
from jinja2 import Environment as BaseEnvironment
|
from jinja2 import Environment as BaseEnvironment
|
||||||
from jinja2 import TemplateNotFound
|
from jinja2 import TemplateNotFound
|
||||||
|
|
|
||||||
|
|
@ -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
|
from contextlib import contextmanager
|
||||||
|
|
||||||
import werkzeug.test
|
import werkzeug.test
|
||||||
|
|
|
||||||
|
|
@ -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
|
from .globals import request
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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.exceptions import BadRequest
|
||||||
from werkzeug.wrappers import Request as RequestBase
|
from werkzeug.wrappers import Request as RequestBase
|
||||||
from werkzeug.wrappers import Response as ResponseBase
|
from werkzeug.wrappers import Response as ResponseBase
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,3 @@
|
||||||
"""
|
|
||||||
tests.conftest
|
|
||||||
~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
:copyright: 2010 Pallets
|
|
||||||
:license: BSD-3-Clause
|
|
||||||
"""
|
|
||||||
import os
|
import os
|
||||||
import pkgutil
|
import pkgutil
|
||||||
import sys
|
import sys
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,3 @@
|
||||||
"""
|
|
||||||
tests.appctx
|
|
||||||
~~~~~~~~~~~~
|
|
||||||
|
|
||||||
Tests the application context.
|
|
||||||
|
|
||||||
:copyright: 2010 Pallets
|
|
||||||
:license: BSD-3-Clause
|
|
||||||
"""
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
import flask
|
import flask
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,3 @@
|
||||||
"""
|
|
||||||
tests.basic
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
The basic functionality.
|
|
||||||
|
|
||||||
:copyright: 2010 Pallets
|
|
||||||
:license: BSD-3-Clause
|
|
||||||
"""
|
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
import time
|
import time
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,3 @@
|
||||||
"""
|
|
||||||
tests.blueprints
|
|
||||||
~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
Blueprints (and currently modules)
|
|
||||||
|
|
||||||
:copyright: 2010 Pallets
|
|
||||||
:license: BSD-3-Clause
|
|
||||||
"""
|
|
||||||
import functools
|
import functools
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
|
||||||
|
|
@ -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
|
# This file was part of Flask-CLI and was modified under the terms of
|
||||||
# its Revised BSD License. Copyright © 2015 CERN.
|
# its Revised BSD License. Copyright © 2015 CERN.
|
||||||
import os
|
import os
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,3 @@
|
||||||
"""
|
|
||||||
tests.test_config
|
|
||||||
~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
:copyright: 2010 Pallets
|
|
||||||
:license: BSD-3-Clause
|
|
||||||
"""
|
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
import textwrap
|
import textwrap
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,3 @@
|
||||||
"""
|
|
||||||
tests.helpers
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
Various helpers.
|
|
||||||
|
|
||||||
:copyright: 2010 Pallets
|
|
||||||
:license: BSD-3-Clause
|
|
||||||
"""
|
|
||||||
import datetime
|
import datetime
|
||||||
import io
|
import io
|
||||||
import os
|
import os
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,3 @@
|
||||||
"""
|
|
||||||
tests.test_instance
|
|
||||||
~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
:copyright: 2010 Pallets
|
|
||||||
:license: BSD-3-Clause
|
|
||||||
"""
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,3 @@
|
||||||
"""
|
|
||||||
tests.test_json_tag
|
|
||||||
~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
:copyright: 2010 Pallets
|
|
||||||
:license: BSD-3-Clause
|
|
||||||
"""
|
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from uuid import uuid4
|
from uuid import uuid4
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,3 @@
|
||||||
"""
|
|
||||||
tests.test_logging
|
|
||||||
~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
:copyright: 2010 Pallets
|
|
||||||
:license: BSD-3-Clause
|
|
||||||
"""
|
|
||||||
import logging
|
import logging
|
||||||
import sys
|
import sys
|
||||||
from io import StringIO
|
from io import StringIO
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,3 @@
|
||||||
"""
|
|
||||||
tests.regression
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
Tests regressions.
|
|
||||||
|
|
||||||
:copyright: 2010 Pallets
|
|
||||||
:license: BSD-3-Clause
|
|
||||||
"""
|
|
||||||
import gc
|
import gc
|
||||||
import platform
|
import platform
|
||||||
import threading
|
import threading
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,3 @@
|
||||||
"""
|
|
||||||
tests.reqctx
|
|
||||||
~~~~~~~~~~~~
|
|
||||||
|
|
||||||
Tests the request context.
|
|
||||||
|
|
||||||
:copyright: 2010 Pallets
|
|
||||||
:license: BSD-3-Clause
|
|
||||||
"""
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
import flask
|
import flask
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,3 @@
|
||||||
"""
|
|
||||||
tests.signals
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
Signalling.
|
|
||||||
|
|
||||||
:copyright: 2010 Pallets
|
|
||||||
:license: BSD-3-Clause
|
|
||||||
"""
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
|
||||||
|
|
@ -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
|
from io import StringIO
|
||||||
|
|
||||||
import flask
|
import flask
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,3 @@
|
||||||
"""
|
|
||||||
tests.templating
|
|
||||||
~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
Template functionality
|
|
||||||
|
|
||||||
:copyright: 2010 Pallets
|
|
||||||
:license: BSD-3-Clause
|
|
||||||
"""
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,3 @@
|
||||||
"""
|
|
||||||
tests.testing
|
|
||||||
~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
Test client and more.
|
|
||||||
|
|
||||||
:copyright: 2010 Pallets
|
|
||||||
:license: BSD-3-Clause
|
|
||||||
"""
|
|
||||||
import click
|
import click
|
||||||
import pytest
|
import pytest
|
||||||
import werkzeug
|
import werkzeug
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,3 @@
|
||||||
"""
|
|
||||||
tests.test_user_error_handler
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
:copyright: 2010 Pallets
|
|
||||||
:license: BSD-3-Clause
|
|
||||||
"""
|
|
||||||
import pytest
|
import pytest
|
||||||
from werkzeug.exceptions import Forbidden
|
from werkzeug.exceptions import Forbidden
|
||||||
from werkzeug.exceptions import HTTPException
|
from werkzeug.exceptions import HTTPException
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,3 @@
|
||||||
"""
|
|
||||||
tests.views
|
|
||||||
~~~~~~~~~~~
|
|
||||||
|
|
||||||
Pluggable views.
|
|
||||||
|
|
||||||
:copyright: 2010 Pallets
|
|
||||||
:license: BSD-3-Clause
|
|
||||||
"""
|
|
||||||
import pytest
|
import pytest
|
||||||
from werkzeug.http import parse_set_header
|
from werkzeug.http import parse_set_header
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue