remove unused module docstrings
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by David Lord · committed by David Lord · parent cd8a374 · Browse files · 37 files·+15 added−331 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
37 files+15 added−331 removed
- tests:+0 added−149 removed
- other:+15 added−182 removed
Provenance
- Commit
f2f027d- Tree
c2819c8- Author
David Lord <davidism@gmail.com>- Committer
David Lord <davidism@gmail.com>- Parent
cd8a374
37 files changed+15 added−331 removed
modified:src/flask/json/__init__.py-7 removed
1-"""2-flask.json3-~~~~~~~~~~4-5-:copyright: 2010 Pallets6-:license: BSD-3-Clause7-"""1 import codecs2 import io3 import uuid4 from datetime import date362 unmodified linesmodified:src/flask/json/tag.py+13 added-13 removed
1 """2 Tagged JSON3 ~~~~~~~~~~~4 5-A compact representation for lossless serialization of non-standard JSON types.6-:class:`~flask.sessions.SecureCookieSessionInterface` uses this to serialize7-the session data, but it may be useful in other places. It can be extended to8-support other types.5+A compact representation for lossless serialization of non-standard JSON6+types. :class:`~flask.sessions.SecureCookieSessionInterface` uses this7+to serialize the session data, but it may be useful in other places. It8+can be extended to support other types.9 10 .. autoclass:: TaggedJSONSerializer11 :members:12 13 .. autoclass:: JSONTag14 :members:15 16-Let's seen an example that adds support for :class:`~collections.OrderedDict`.17-Dicts don't have an order in Python or JSON, so to handle this we will dump18-the items as a list of ``[key, value]`` pairs. Subclass :class:`JSONTag` and19-give it the new key ``' od'`` to identify the type. The session serializer20-processes dicts first, so insert the new tag at the front of the order since21-``OrderedDict`` must be processed before ``dict``. ::16+Let's see an example that adds support for17+:class:`~collections.OrderedDict`. Dicts don't have an order in JSON, so18+to handle this we will dump the items as a list of ``[key, value]``19+pairs. Subclass :class:`JSONTag` and give it the new key ``' od'`` to20+identify the type. The session serializer processes dicts first, so21+insert the new tag at the front of the order since ``OrderedDict`` must22+be processed before ``dict``.23 24+.. code-block:: python25+26 from flask.json.tag import JSONTag27 28 class TagOrderedDict(JSONTag):29 __slots__ = ('serializer',)8 unmodified lines38 def to_python(self, value):39 return OrderedDict(value)40 41 app.session_interface.serializer.register(TagOrderedDict, index=0)39-40-:copyright: 2010 Pallets41-:license: BSD-3-Clause42 """43 from base64 import b64decode44 from base64 import b64encode45 from datetime import datetime261 unmodified linesmodified:src/flask/__init__.py-12 removed
1-"""2- flask3- ~~~~~4-5- A microframework based on Werkzeug. It's extensively documented6- and follows best practice patterns.7-8- :copyright: 2010 Pallets9- :license: BSD-3-Clause10-"""11-# utilities we import from Werkzeug and Jinja2 that are unused12-# in the module but are exported as public interface.1 from jinja2 import escape2 from jinja2 import Markup3 from werkzeug.exceptions import abort4 from werkzeug.utils import redirect42 unmodified linesmodified:src/flask/__main__.py+2 added-13 removed
1-"""2- flask.__main__3- ~~~~~~~~~~~~~~1+from .cli import main2 5- Alias for flask.run for the command line.6-7- :copyright: 2010 Pallets8- :license: BSD-3-Clause9-"""10-11-if __name__ == "__main__":12- from .cli import main13-14- main(as_module=True)3+main(as_module=True)modified:src/flask/app.py-9 removed
1-"""2- flask.app3- ~~~~~~~~~4-5- This module implements the central WSGI application object.6-7- :copyright: 2010 Pallets8- :license: BSD-3-Clause9-"""1 import os2 import sys3 from datetime import timedelta4 from functools import update_wrapper2367 unmodified linesmodified:src/flask/blueprints.py-10 removed
1-"""2- flask.blueprints3- ~~~~~~~~~~~~~~~~4-5- Blueprints are the recommended way to implement larger or more6- pluggable applications in Flask 0.7 and later.7-8- :copyright: 2010 Pallets9- :license: BSD-3-Clause10-"""1 from functools import update_wrapper2 3 from .helpers import _endpoint_from_view_func4 from .helpers import _PackageBoundObject554 unmodified linesmodified:src/flask/cli.py-9 removed
1-"""2- flask.cli3- ~~~~~~~~~4-5- A simple command line application to run flask apps.6-7- :copyright: 2010 Pallets8- :license: BSD-3-Clause9-"""1 import ast2 import inspect3 import os4 import platform936 unmodified linesmodified:src/flask/config.py-9 removed
1-"""2- flask.config3- ~~~~~~~~~~~~4-5- Implements the configuration related objects.6-7- :copyright: 2010 Pallets8- :license: BSD-3-Clause9-"""1 import errno2 import os3 import types4 260 unmodified linesmodified:src/flask/ctx.py-9 removed
1-"""2- flask.ctx3- ~~~~~~~~~4-5- Implements the objects required to keep the context.6-7- :copyright: 2010 Pallets8- :license: BSD-3-Clause9-"""1 import sys2 from functools import update_wrapper3 4 from werkzeug.exceptions import HTTPException438 unmodified linesmodified:src/flask/debughelpers.py-9 removed
1-"""2- flask.debughelpers3- ~~~~~~~~~~~~~~~~~~4-5- Various helpers to make the development experience better.6-7- :copyright: 2010 Pallets8- :license: BSD-3-Clause9-"""1 import os2 from warnings import warn3 4 from .app import Flask166 unmodified linesmodified:src/flask/globals.py-10 removed
1-"""2- flask.globals3- ~~~~~~~~~~~~~4-5- Defines all the global objects that are proxies to the current6- active context.7-8- :copyright: 2010 Pallets9- :license: BSD-3-Clause10-"""1 from functools import partial2 3 from werkzeug.local import LocalProxy4 from werkzeug.local import LocalStack47 unmodified linesmodified:src/flask/helpers.py-9 removed
1-"""2- flask.helpers3- ~~~~~~~~~~~~~4-5- Implements various helpers.6-7- :copyright: 2010 Pallets8- :license: BSD-3-Clause9-"""1 import io2 import mimetypes3 import os4 import pkgutil1120 unmodified linesmodified:src/flask/logging.py-7 removed
1-"""2-flask.logging3-~~~~~~~~~~~~~4-5-:copyright: 2010 Pallets6-:license: BSD-3-Clause7-"""1 import logging2 import sys3 4 from werkzeug.local import LocalProxy66 unmodified linesmodified:src/flask/sessions.py-9 removed
1-"""2- flask.sessions3- ~~~~~~~~~~~~~~4-5- Implements cookie based sessions based on itsdangerous.6-7- :copyright: 2010 Pallets8- :license: BSD-3-Clause9-"""1 import hashlib2 import warnings3 from collections.abc import MutableMapping4 from datetime import datetime380 unmodified linesmodified:src/flask/signals.py-10 removed
1-"""2- flask.signals3- ~~~~~~~~~~~~~4-5- Implements signals based on blinker if available, otherwise6- falls silently back to a noop.7-8- :copyright: 2010 Pallets9- :license: BSD-3-Clause10-"""1 try:2 from blinker import Namespace3 4 signals_available = True50 unmodified linesmodified:src/flask/templating.py-9 removed
1-"""2- flask.templating3- ~~~~~~~~~~~~~~~~4-5- Implements the bridge to Jinja2.6-7- :copyright: 2010 Pallets8- :license: BSD-3-Clause9-"""1 from jinja2 import BaseLoader2 from jinja2 import Environment as BaseEnvironment3 from jinja2 import TemplateNotFound4 141 unmodified linesmodified:src/flask/testing.py-10 removed
1-"""2- flask.testing3- ~~~~~~~~~~~~~4-5- Implements test support helpers. This module is lazily imported6- and usually not used in production environments.7-8- :copyright: 2010 Pallets9- :license: BSD-3-Clause10-"""1 from contextlib import contextmanager2 3 import werkzeug.test4 from click.testing import CliRunner249 unmodified linesmodified:src/flask/views.py-9 removed
1-"""2- flask.views3- ~~~~~~~~~~~4-5- This module provides class-based views inspired by the ones in Django.6-7- :copyright: 2010 Pallets8- :license: BSD-3-Clause9-"""1 from .globals import request2 3 4 http_method_funcs = frozenset(148 unmodified linesmodified:src/flask/wrappers.py-9 removed
1-"""2- flask.wrappers3- ~~~~~~~~~~~~~~4-5- Implements the WSGI wrappers (request and response).6-7- :copyright: 2010 Pallets8- :license: BSD-3-Clause9-"""1 from werkzeug.exceptions import BadRequest2 from werkzeug.wrappers import Request as RequestBase3 from werkzeug.wrappers import Response as ResponseBase4 from werkzeug.wrappers.json import JSONMixin as _JSONMixin123 unmodified linesmodified:tests/conftest.py-7 removed
1-"""2- tests.conftest3- ~~~~~~~~~~~~~~4-5- :copyright: 2010 Pallets6- :license: BSD-3-Clause7-"""1 import os2 import pkgutil3 import sys4 import textwrap187 unmodified linesmodified:tests/test_appctx.py-9 removed
1-"""2- tests.appctx3- ~~~~~~~~~~~~4-5- Tests the application context.6-7- :copyright: 2010 Pallets8- :license: BSD-3-Clause9-"""1 import pytest2 3 import flask4 206 unmodified linesmodified:tests/test_basic.py-9 removed
1-"""2- tests.basic3- ~~~~~~~~~~~~~~~~~~~~~4-5- The basic functionality.6-7- :copyright: 2010 Pallets8- :license: BSD-3-Clause9-"""1 import re2 import sys3 import time4 import uuid1955 unmodified linesmodified:tests/test_blueprints.py-9 removed
1-"""2- tests.blueprints3- ~~~~~~~~~~~~~~~~4-5- Blueprints (and currently modules)6-7- :copyright: 2010 Pallets8- :license: BSD-3-Clause9-"""1 import functools2 3 import pytest4 from jinja2 import TemplateNotFound848 unmodified linesmodified:tests/test_cli.py-7 removed
1-"""2- tests.test_cli3- ~~~~~~~~~~~~~~4-5- :copyright: 2010 Pallets6- :license: BSD-3-Clause7-"""1 # This file was part of Flask-CLI and was modified under the terms of2 # its Revised BSD License. Copyright © 2015 CERN.3 import os4 import ssl648 unmodified linesmodified:tests/test_config.py-7 removed
1-"""2- tests.test_config3- ~~~~~~~~~~~~~~~~~4-5- :copyright: 2010 Pallets6- :license: BSD-3-Clause7-"""1 import json2 import os3 import textwrap4 from datetime import timedelta186 unmodified linesmodified:tests/test_helpers.py-9 removed
1-"""2- tests.helpers3- ~~~~~~~~~~~~~~~~~~~~~~~4-5- Various helpers.6-7- :copyright: 2010 Pallets8- :license: BSD-3-Clause9-"""1 import datetime2 import io3 import os4 import sys1018 unmodified linesmodified:tests/test_instance_config.py-7 removed
1-"""2- tests.test_instance3- ~~~~~~~~~~~~~~~~~~~4-5- :copyright: 2010 Pallets6- :license: BSD-3-Clause7-"""1 import os2 import sys3 4 import pytest117 unmodified linesmodified:tests/test_json_tag.py-7 removed
1-"""2-tests.test_json_tag3-~~~~~~~~~~~~~~~~~~~4-5-:copyright: 2010 Pallets6-:license: BSD-3-Clause7-"""1 from datetime import datetime2 from uuid import uuid43 4 import pytest81 unmodified linesmodified:tests/test_logging.py-7 removed
1-"""2-tests.test_logging3-~~~~~~~~~~~~~~~~~~~4-5-:copyright: 2010 Pallets6-:license: BSD-3-Clause7-"""1 import logging2 import sys3 from io import StringIO4 94 unmodified linesmodified:tests/test_regression.py-9 removed
1-"""2- tests.regression3- ~~~~~~~~~~~~~~~~~~~~~~~~~~4-5- Tests regressions.6-7- :copyright: 2010 Pallets8- :license: BSD-3-Clause9-"""1 import gc2 import platform3 import threading4 82 unmodified linesmodified:tests/test_reqctx.py-9 removed
1-"""2- tests.reqctx3- ~~~~~~~~~~~~4-5- Tests the request context.6-7- :copyright: 2010 Pallets8- :license: BSD-3-Clause9-"""1 import pytest2 3 import flask4 from flask.sessions import SecureCookieSessionInterface316 unmodified linesmodified:tests/test_signals.py-9 removed
1-"""2- tests.signals3- ~~~~~~~~~~~~~~~~~~~~~~~4-5- Signalling.6-7- :copyright: 2010 Pallets8- :license: BSD-3-Clause9-"""1 import pytest2 3 try:4 import blinker192 unmodified linesmodified:tests/test_subclassing.py-10 removed
1-"""2- tests.subclassing3- ~~~~~~~~~~~~~~~~~4-5- Test that certain behavior of flask can be customized by6- subclasses.7-8- :copyright: 2010 Pallets9- :license: BSD-3-Clause10-"""1 from io import StringIO2 3 import flask4 17 unmodified linesmodified:tests/test_templating.py-9 removed
1-"""2- tests.templating3- ~~~~~~~~~~~~~~~~4-5- Template functionality6-7- :copyright: 2010 Pallets8- :license: BSD-3-Clause9-"""1 import logging2 3 import pytest4 import werkzeug.serving439 unmodified linesmodified:tests/test_testing.py-9 removed
1-"""2- tests.testing3- ~~~~~~~~~~~~~4-5- Test client and more.6-7- :copyright: 2010 Pallets8- :license: BSD-3-Clause9-"""1 import click2 import pytest3 import werkzeug4 420 unmodified linesmodified:tests/test_user_error_handler.py-7 removed
1-"""2-tests.test_user_error_handler3-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~4-5-:copyright: 2010 Pallets6-:license: BSD-3-Clause7-"""1 import pytest2 from werkzeug.exceptions import Forbidden3 from werkzeug.exceptions import HTTPException4 from werkzeug.exceptions import InternalServerError277 unmodified linesmodified:tests/test_views.py-9 removed
1-"""2- tests.views3- ~~~~~~~~~~~4-5- Pluggable views.6-7- :copyright: 2010 Pallets8- :license: BSD-3-Clause9-"""1 import pytest2 from werkzeug.http import parse_set_header3 4 import flask.views238 unmodified lines