Skip to content
Myr

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

37 files+15 added−331 removed

modified:src/flask/json/__init__.py-7 removed
1"""2flask.json3~~~~~~~~~~45:copyright: 2010 Pallets6:license: BSD-3-Clause7"""1import codecs2import io3import uuid4from datetime import date
362 unmodified lines
modified:src/flask/json/tag.py+13 added-13 removed
1"""2Tagged JSON3~~~~~~~~~~~45A compact representation for lossless serialization of non-standard JSON types.6:class:`~flask.sessions.SecureCookieSessionInterface` uses this to serialize7the session data, but it may be useful in other places. It can be extended to8support other types.5A compact representation for lossless serialization of non-standard JSON6types. :class:`~flask.sessions.SecureCookieSessionInterface` uses this7to serialize the session data, but it may be useful in other places. It8can be extended to support other types.910.. autoclass:: TaggedJSONSerializer11 :members:1213.. autoclass:: JSONTag14 :members:1516Let's seen an example that adds support for :class:`~collections.OrderedDict`.17Dicts don't have an order in Python or JSON, so to handle this we will dump18the items as a list of ``[key, value]`` pairs. Subclass :class:`JSONTag` and19give it the new key ``' od'`` to identify the type. The session serializer20processes dicts first, so insert the new tag at the front of the order since21``OrderedDict`` must be processed before ``dict``. ::16Let's see an example that adds support for17:class:`~collections.OrderedDict`. Dicts don't have an order in JSON, so18to handle this we will dump the items as a list of ``[key, value]``19pairs. Subclass :class:`JSONTag` and give it the new key ``' od'`` to20identify the type. The session serializer processes dicts first, so21insert the new tag at the front of the order since ``OrderedDict`` must22be processed before ``dict``.2324.. code-block:: python2526 from flask.json.tag import JSONTag2728 class TagOrderedDict(JSONTag):29 __slots__ = ('serializer',)
8 unmodified lines
38 def to_python(self, value):39 return OrderedDict(value)4041 app.session_interface.serializer.register(TagOrderedDict, index=0)3940:copyright: 2010 Pallets41:license: BSD-3-Clause42"""43from base64 import b64decode44from base64 import b64encode45from datetime import datetime
261 unmodified lines
modified:src/flask/__init__.py-12 removed
1"""2 flask3 ~~~~~45 A microframework based on Werkzeug. It's extensively documented6 and follows best practice patterns.78 :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.1from jinja2 import escape2from jinja2 import Markup3from werkzeug.exceptions import abort4from werkzeug.utils import redirect
42 unmodified lines
modified:src/flask/__main__.py+2 added-13 removed
1"""2 flask.__main__3 ~~~~~~~~~~~~~~1from .cli import main25 Alias for flask.run for the command line.67 :copyright: 2010 Pallets8 :license: BSD-3-Clause9"""1011if __name__ == "__main__":12 from .cli import main1314 main(as_module=True)3main(as_module=True)
modified:src/flask/app.py-9 removed
1"""2 flask.app3 ~~~~~~~~~45 This module implements the central WSGI application object.67 :copyright: 2010 Pallets8 :license: BSD-3-Clause9"""1import os2import sys3from datetime import timedelta4from functools import update_wrapper
2367 unmodified lines
modified:src/flask/blueprints.py-10 removed
1"""2 flask.blueprints3 ~~~~~~~~~~~~~~~~45 Blueprints are the recommended way to implement larger or more6 pluggable applications in Flask 0.7 and later.78 :copyright: 2010 Pallets9 :license: BSD-3-Clause10"""1from functools import update_wrapper23from .helpers import _endpoint_from_view_func4from .helpers import _PackageBoundObject
554 unmodified lines
modified:src/flask/cli.py-9 removed
1"""2 flask.cli3 ~~~~~~~~~45 A simple command line application to run flask apps.67 :copyright: 2010 Pallets8 :license: BSD-3-Clause9"""1import ast2import inspect3import os4import platform
936 unmodified lines
modified:src/flask/config.py-9 removed
1"""2 flask.config3 ~~~~~~~~~~~~45 Implements the configuration related objects.67 :copyright: 2010 Pallets8 :license: BSD-3-Clause9"""1import errno2import os3import types4
260 unmodified lines
modified:src/flask/ctx.py-9 removed
1"""2 flask.ctx3 ~~~~~~~~~45 Implements the objects required to keep the context.67 :copyright: 2010 Pallets8 :license: BSD-3-Clause9"""1import sys2from functools import update_wrapper34from werkzeug.exceptions import HTTPException
438 unmodified lines
modified:src/flask/debughelpers.py-9 removed
1"""2 flask.debughelpers3 ~~~~~~~~~~~~~~~~~~45 Various helpers to make the development experience better.67 :copyright: 2010 Pallets8 :license: BSD-3-Clause9"""1import os2from warnings import warn34from .app import Flask
166 unmodified lines
modified:src/flask/globals.py-10 removed
1"""2 flask.globals3 ~~~~~~~~~~~~~45 Defines all the global objects that are proxies to the current6 active context.78 :copyright: 2010 Pallets9 :license: BSD-3-Clause10"""1from functools import partial23from werkzeug.local import LocalProxy4from werkzeug.local import LocalStack
47 unmodified lines
modified:src/flask/helpers.py-9 removed
1"""2 flask.helpers3 ~~~~~~~~~~~~~45 Implements various helpers.67 :copyright: 2010 Pallets8 :license: BSD-3-Clause9"""1import io2import mimetypes3import os4import pkgutil
1120 unmodified lines
modified:src/flask/logging.py-7 removed
1"""2flask.logging3~~~~~~~~~~~~~45:copyright: 2010 Pallets6:license: BSD-3-Clause7"""1import logging2import sys34from werkzeug.local import LocalProxy
66 unmodified lines
modified:src/flask/sessions.py-9 removed
1"""2 flask.sessions3 ~~~~~~~~~~~~~~45 Implements cookie based sessions based on itsdangerous.67 :copyright: 2010 Pallets8 :license: BSD-3-Clause9"""1import hashlib2import warnings3from collections.abc import MutableMapping4from datetime import datetime
380 unmodified lines
modified:src/flask/signals.py-10 removed
1"""2 flask.signals3 ~~~~~~~~~~~~~45 Implements signals based on blinker if available, otherwise6 falls silently back to a noop.78 :copyright: 2010 Pallets9 :license: BSD-3-Clause10"""1try:2 from blinker import Namespace34 signals_available = True
50 unmodified lines
modified:src/flask/templating.py-9 removed
1"""2 flask.templating3 ~~~~~~~~~~~~~~~~45 Implements the bridge to Jinja2.67 :copyright: 2010 Pallets8 :license: BSD-3-Clause9"""1from jinja2 import BaseLoader2from jinja2 import Environment as BaseEnvironment3from jinja2 import TemplateNotFound4
141 unmodified lines
modified:src/flask/testing.py-10 removed
1"""2 flask.testing3 ~~~~~~~~~~~~~45 Implements test support helpers. This module is lazily imported6 and usually not used in production environments.78 :copyright: 2010 Pallets9 :license: BSD-3-Clause10"""1from contextlib import contextmanager23import werkzeug.test4from click.testing import CliRunner
249 unmodified lines
modified:src/flask/views.py-9 removed
1"""2 flask.views3 ~~~~~~~~~~~45 This module provides class-based views inspired by the ones in Django.67 :copyright: 2010 Pallets8 :license: BSD-3-Clause9"""1from .globals import request234http_method_funcs = frozenset(
148 unmodified lines
modified:src/flask/wrappers.py-9 removed
1"""2 flask.wrappers3 ~~~~~~~~~~~~~~45 Implements the WSGI wrappers (request and response).67 :copyright: 2010 Pallets8 :license: BSD-3-Clause9"""1from werkzeug.exceptions import BadRequest2from werkzeug.wrappers import Request as RequestBase3from werkzeug.wrappers import Response as ResponseBase4from werkzeug.wrappers.json import JSONMixin as _JSONMixin
123 unmodified lines
modified:tests/conftest.py-7 removed
1"""2 tests.conftest3 ~~~~~~~~~~~~~~45 :copyright: 2010 Pallets6 :license: BSD-3-Clause7"""1import os2import pkgutil3import sys4import textwrap
187 unmodified lines
modified:tests/test_appctx.py-9 removed
1"""2 tests.appctx3 ~~~~~~~~~~~~45 Tests the application context.67 :copyright: 2010 Pallets8 :license: BSD-3-Clause9"""1import pytest23import flask4
206 unmodified lines
modified:tests/test_basic.py-9 removed
1"""2 tests.basic3 ~~~~~~~~~~~~~~~~~~~~~45 The basic functionality.67 :copyright: 2010 Pallets8 :license: BSD-3-Clause9"""1import re2import sys3import time4import uuid
1955 unmodified lines
modified:tests/test_blueprints.py-9 removed
1"""2 tests.blueprints3 ~~~~~~~~~~~~~~~~45 Blueprints (and currently modules)67 :copyright: 2010 Pallets8 :license: BSD-3-Clause9"""1import functools23import pytest4from jinja2 import TemplateNotFound
848 unmodified lines
modified:tests/test_cli.py-7 removed
1"""2 tests.test_cli3 ~~~~~~~~~~~~~~45 :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.3import os4import ssl
648 unmodified lines
modified:tests/test_config.py-7 removed
1"""2 tests.test_config3 ~~~~~~~~~~~~~~~~~45 :copyright: 2010 Pallets6 :license: BSD-3-Clause7"""1import json2import os3import textwrap4from datetime import timedelta
186 unmodified lines
modified:tests/test_helpers.py-9 removed
1"""2 tests.helpers3 ~~~~~~~~~~~~~~~~~~~~~~~45 Various helpers.67 :copyright: 2010 Pallets8 :license: BSD-3-Clause9"""1import datetime2import io3import os4import sys
1018 unmodified lines
modified:tests/test_instance_config.py-7 removed
1"""2 tests.test_instance3 ~~~~~~~~~~~~~~~~~~~45 :copyright: 2010 Pallets6 :license: BSD-3-Clause7"""1import os2import sys34import pytest
117 unmodified lines
modified:tests/test_json_tag.py-7 removed
1"""2tests.test_json_tag3~~~~~~~~~~~~~~~~~~~45:copyright: 2010 Pallets6:license: BSD-3-Clause7"""1from datetime import datetime2from uuid import uuid434import pytest
81 unmodified lines
modified:tests/test_logging.py-7 removed
1"""2tests.test_logging3~~~~~~~~~~~~~~~~~~~45:copyright: 2010 Pallets6:license: BSD-3-Clause7"""1import logging2import sys3from io import StringIO4
94 unmodified lines
modified:tests/test_regression.py-9 removed
1"""2 tests.regression3 ~~~~~~~~~~~~~~~~~~~~~~~~~~45 Tests regressions.67 :copyright: 2010 Pallets8 :license: BSD-3-Clause9"""1import gc2import platform3import threading4
82 unmodified lines
modified:tests/test_reqctx.py-9 removed
1"""2 tests.reqctx3 ~~~~~~~~~~~~45 Tests the request context.67 :copyright: 2010 Pallets8 :license: BSD-3-Clause9"""1import pytest23import flask4from flask.sessions import SecureCookieSessionInterface
316 unmodified lines
modified:tests/test_signals.py-9 removed
1"""2 tests.signals3 ~~~~~~~~~~~~~~~~~~~~~~~45 Signalling.67 :copyright: 2010 Pallets8 :license: BSD-3-Clause9"""1import pytest23try:4 import blinker
192 unmodified lines
modified:tests/test_subclassing.py-10 removed
1"""2 tests.subclassing3 ~~~~~~~~~~~~~~~~~45 Test that certain behavior of flask can be customized by6 subclasses.78 :copyright: 2010 Pallets9 :license: BSD-3-Clause10"""1from io import StringIO23import flask4
17 unmodified lines
modified:tests/test_templating.py-9 removed
1"""2 tests.templating3 ~~~~~~~~~~~~~~~~45 Template functionality67 :copyright: 2010 Pallets8 :license: BSD-3-Clause9"""1import logging23import pytest4import werkzeug.serving
439 unmodified lines
modified:tests/test_testing.py-9 removed
1"""2 tests.testing3 ~~~~~~~~~~~~~45 Test client and more.67 :copyright: 2010 Pallets8 :license: BSD-3-Clause9"""1import click2import pytest3import werkzeug4
420 unmodified lines
modified:tests/test_user_error_handler.py-7 removed
1"""2tests.test_user_error_handler3~~~~~~~~~~~~~~~~~~~~~~~~~~~~~45:copyright: 2010 Pallets6:license: BSD-3-Clause7"""1import pytest2from werkzeug.exceptions import Forbidden3from werkzeug.exceptions import HTTPException4from werkzeug.exceptions import InternalServerError
277 unmodified lines
modified:tests/test_views.py-9 removed
1"""2 tests.views3 ~~~~~~~~~~~45 Pluggable views.67 :copyright: 2010 Pallets8 :license: BSD-3-Clause9"""1import pytest2from werkzeug.http import parse_set_header34import flask.views
238 unmodified lines