Merge pull request #1225 from s3rvac/typo-and-cosmetic-fixes

Typo and cosmetic fixes
This commit is contained in:
Markus Unterwaditzer 2014-10-27 18:31:33 +01:00
commit 84efebd6be
19 changed files with 26 additions and 28 deletions

View file

@ -4,7 +4,7 @@
<h1>This is blueprint example</h1> <h1>This is blueprint example</h1>
<p> <p>
A simple page blueprint is registered under / and /pages A simple page blueprint is registered under / and /pages
you can access it using this urls: you can access it using this URLs:
<ul> <ul>
<li><a href="{{ url_for('simple_page.show', page='hello') }}">/hello</a> <li><a href="{{ url_for('simple_page.show', page='hello') }}">/hello</a>
<li><a href="{{ url_for('simple_page.show', page='world') }}">/world</a> <li><a href="{{ url_for('simple_page.show', page='world') }}">/world</a>

View file

@ -257,7 +257,7 @@ class AppGroup(click.Group):
class FlaskGroup(AppGroup): class FlaskGroup(AppGroup):
"""Special subclass of the the :class:`AppGroup` group that supports """Special subclass of the :class:`AppGroup` group that supports
loading more commands from the configured Flask app. Normally a loading more commands from the configured Flask app. Normally a
developer does not have to interface with this class but there are developer does not have to interface with this class but there are
some very advanced use cases for which it makes sense to create an some very advanced use cases for which it makes sense to create an

View file

@ -264,7 +264,7 @@ def url_for(endpoint, **values):
'executed when application context is available.') 'executed when application context is available.')
# If request specific information is available we have some extra # If request specific information is available we have some extra
# features that support "relative" urls. # features that support "relative" URLs.
if reqctx is not None: if reqctx is not None:
url_adapter = reqctx.url_adapter url_adapter = reqctx.url_adapter
blueprint_name = request.blueprint blueprint_name = request.blueprint
@ -284,7 +284,7 @@ def url_for(endpoint, **values):
external = values.pop('_external', False) external = values.pop('_external', False)
# Otherwise go with the url adapter from the appctx and make # Otherwise go with the url adapter from the appctx and make
# the urls external by default. # the URLs external by default.
else: else:
url_adapter = appctx.url_adapter url_adapter = appctx.url_adapter
if url_adapter is None: if url_adapter is None:
@ -529,7 +529,7 @@ def send_file(filename_or_fp, mimetype=None, as_attachment=False,
rv = current_app.response_class(data, mimetype=mimetype, headers=headers, rv = current_app.response_class(data, mimetype=mimetype, headers=headers,
direct_passthrough=True) direct_passthrough=True)
# if we know the file modification date, we can store it as the # if we know the file modification date, we can store it as
# the time of the last modification. # the time of the last modification.
if mtime is not None: if mtime is not None:
rv.last_modified = int(mtime) rv.last_modified = int(mtime)

View file

@ -4,7 +4,7 @@
~~~~~~~~~~~~~ ~~~~~~~~~~~~~
Implements signals based on blinker if available, otherwise Implements signals based on blinker if available, otherwise
falls silently back to a noop falls silently back to a noop.
:copyright: (c) 2014 by Armin Ronacher. :copyright: (c) 2014 by Armin Ronacher.
:license: BSD, see LICENSE for more details. :license: BSD, see LICENSE for more details.

View file

@ -33,7 +33,6 @@ def leak_detector(request):
request.addfinalizer(ensure_clean_request_context) request.addfinalizer(ensure_clean_request_context)
@pytest.fixture(params=(True, False)) @pytest.fixture(params=(True, False))
def limit_loader(request, monkeypatch): def limit_loader(request, monkeypatch):
"""Patch pkgutil.get_loader to give loader without get_filename or archive. """Patch pkgutil.get_loader to give loader without get_filename or archive.

View file

@ -41,13 +41,13 @@ def test_request_context_means_app_context():
app = flask.Flask(__name__) app = flask.Flask(__name__)
with app.test_request_context(): with app.test_request_context():
assert flask.current_app._get_current_object() == app assert flask.current_app._get_current_object() == app
assert flask._app_ctx_stack.top == None assert flask._app_ctx_stack.top is None
def test_app_context_provides_current_app(): def test_app_context_provides_current_app():
app = flask.Flask(__name__) app = flask.Flask(__name__)
with app.app_context(): with app.app_context():
assert flask.current_app._get_current_object() == app assert flask.current_app._get_current_object() == app
assert flask._app_ctx_stack.top == None assert flask._app_ctx_stack.top is None
def test_app_tearing_down(): def test_app_tearing_down():
cleanup_stuff = [] cleanup_stuff = []

View file

@ -19,7 +19,6 @@ except ImportError:
import flask import flask
pytestmark = pytest.mark.skipif( pytestmark = pytest.mark.skipif(
blinker is None, blinker is None,
reason='Signals require the blinker library.' reason='Signals require the blinker library.'