From b81f72070ec0dc2bede09eedea3d0b0360887720 Mon Sep 17 00:00:00 2001 From: Paulo Bu Date: Thu, 28 Aug 2014 16:51:53 +0200 Subject: [PATCH] Fix warnings and code styling in the doc There was a blank line missing that was generating a warning when building the doc. Also, a removed function from cli.py was left in api.rst (without_appcontext specifically) so this was also generating warnings. Also corrects the format for a code block and adds a link to Werkzeug's Headers class. --- docs/api.rst | 5 ++--- flask/testing.py | 2 ++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/api.rst b/docs/api.rst index 8eb1b86e..0df1a1f3 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -142,7 +142,7 @@ Response Objects .. attribute:: headers - A :class:`Headers` object representing the response headers. + A :class:`~werkzeug.datastructures.Headers` object representing the response headers. .. attribute:: status @@ -771,11 +771,10 @@ Command Line Interface .. autofunction:: with_appcontext .. autofunction:: pass_script_info + Marks a function so that an instance of :class:`ScriptInfo` is passed as first argument to the click callback. -.. autofunction:: without_appcontext - .. autofunction:: script_info_option A special decorator that informs a click callback to be passed the diff --git a/flask/testing.py b/flask/testing.py index 6351462b..6463c084 100644 --- a/flask/testing.py +++ b/flask/testing.py @@ -54,6 +54,8 @@ class FlaskClient(Client): the test client uses. Once the with block is left the session is stored back. + :: + with client.session_transaction() as session: session['value'] = 42