Browse Source

Merge pull request #1000 from mikar/master

harmless comment fixes/typos
pull/888/merge
Kenneth Reitz 11 years ago
parent
commit
872094c556
  1. 2
      flask/json.py
  2. 2
      flask/sessions.py
  3. 4
      flask/signals.py
  4. 8
      flask/views.py
  5. 12
      flask/wrappers.py

2
flask/json.py

@ -25,7 +25,7 @@ except ImportError:
from itsdangerous import json as _json
# figure out if simplejson escapes slashes. This behavior was changed
# Figure out if simplejson escapes slashes. This behavior was changed
# from one version to another without reason.
_slash_escape = '\\/' not in _json.dumps('/')

2
flask/sessions.py

@ -223,7 +223,7 @@ class SessionInterface(object):
def get_cookie_path(self, app):
"""Returns the path for which the cookie should be valid. The
default implementation uses the value from the SESSION_COOKIE_PATH``
default implementation uses the value from the ``SESSION_COOKIE_PATH``
config var if it's set, and falls back to ``APPLICATION_ROOT`` or
uses ``/`` if it's `None`.
"""

4
flask/signals.py

@ -37,12 +37,12 @@ except ImportError:
temporarily_connected_to = connected_to = _fail
del _fail
# the namespace for code signals. If you are not flask code, do
# The namespace for code signals. If you are not flask code, do
# not put signals in here. Create your own namespace instead.
_signals = Namespace()
# core signals. For usage examples grep the sourcecode or consult
# Core signals. For usage examples grep the sourcecode or consult
# the API documentation in docs/api.rst as well as docs/signals.rst
template_rendered = _signals.signal('template-rendered')
request_started = _signals.signal('request-started')

8
flask/views.py

@ -89,7 +89,7 @@ class View(object):
for decorator in cls.decorators:
view = decorator(view)
# we attach the view class to the view function for two reasons:
# We attach the view class to the view function for two reasons:
# first of all it allows us to easily figure out what class-based
# view this thing came from, secondly it's also used for instantiating
# the view class so you can actually replace it with something else
@ -111,7 +111,7 @@ class MethodViewType(type):
for key in d:
if key in http_method_funcs:
methods.add(key.upper())
# if we have no method at all in there we don't want to
# If we have no method at all in there we don't want to
# add a method list. (This is for instance the case for
# the baseclass or another subclass of a base method view
# that does not introduce new methods).
@ -141,8 +141,8 @@ class MethodView(with_metaclass(MethodViewType, View)):
"""
def dispatch_request(self, *args, **kwargs):
meth = getattr(self, request.method.lower(), None)
# if the request method is HEAD and we don't have a handler for it
# retry with GET
# If the request method is HEAD and we don't have a handler for it
# retry with GET.
if meth is None and request.method == 'HEAD':
meth = getattr(self, 'get', None)
assert meth is not None, 'Unimplemented method %r' % request.method

12
flask/wrappers.py

@ -40,25 +40,25 @@ class Request(RequestBase):
specific ones.
"""
#: the internal URL rule that matched the request. This can be
#: The internal URL rule that matched the request. This can be
#: useful to inspect which methods are allowed for the URL from
#: a before/after handler (``request.url_rule.methods``) etc.
#:
#: .. versionadded:: 0.6
url_rule = None
#: a dict of view arguments that matched the request. If an exception
#: A dict of view arguments that matched the request. If an exception
#: happened when matching, this will be `None`.
view_args = None
#: if matching the URL failed, this is the exception that will be
#: If matching the URL failed, this is the exception that will be
#: raised / was raised as part of the request handling. This is
#: usually a :exc:`~werkzeug.exceptions.NotFound` exception or
#: something similar.
routing_exception = None
# switched by the request context until 1.0 to opt in deprecated
# module functionality
# Switched by the request context until 1.0 to opt in deprecated
# module functionality.
_is_old_module = False
@property
@ -179,7 +179,7 @@ class Request(RequestBase):
def _load_form_data(self):
RequestBase._load_form_data(self)
# in debug mode we're replacing the files multidict with an ad-hoc
# In debug mode we're replacing the files multidict with an ad-hoc
# subclass that raises a different error for key errors.
ctx = _request_ctx_stack.top
if ctx is not None and ctx.app.debug and \

Loading…
Cancel
Save