Pep8 cleanups (#429)
* PEP8 cleanups * PEP8 cleanups (server.py) * PEP8 cleanups (blueprints.py) * PEP8 cleanups (config.py) * PEP8 cleanups (cookies.py) * PEP8 cleanups (handlers.py) * PEP8 cleanups (request.py) * PEP8 cleanups (response.py) * PEP8 cleanups (router.py) * PEP8 cleanups (sanic.py) #2 * PEP8 cleanups (server.py) #2 * PEP8 cleanups (static.py) * PEP8 cleanups (utils.py) * PEP8 cleanups (views.py) Updated docstring
This commit is contained in:
committed by
Eli Uriegas
parent
286dc3c32b
commit
51611c3934
@@ -177,8 +177,8 @@ def html(body, status=200, headers=None):
|
||||
|
||||
|
||||
async def file(location, mime_type=None, headers=None, _range=None):
|
||||
"""
|
||||
Returns response object with file data.
|
||||
"""Return a response object with file data.
|
||||
|
||||
:param location: Location of file on system.
|
||||
:param mime_type: Specific mime_type.
|
||||
:param headers: Custom Headers.
|
||||
@@ -205,14 +205,12 @@ async def file(location, mime_type=None, headers=None, _range=None):
|
||||
|
||||
def redirect(to, headers=None, status=302,
|
||||
content_type="text/html; charset=utf-8"):
|
||||
"""
|
||||
Aborts execution and causes a 302 redirect (by default).
|
||||
"""Abort execution and cause a 302 redirect (by default).
|
||||
|
||||
:param to: path or fully qualified URL to redirect to
|
||||
:param headers: optional dict of headers to include in the new request
|
||||
:param status: status code (int) of the new request, defaults to 302
|
||||
:param content_type:
|
||||
the content type (string) of the response
|
||||
:param content_type: the content type (string) of the response
|
||||
:returns: the redirecting Response
|
||||
"""
|
||||
headers = headers or {}
|
||||
|
||||
Reference in New Issue
Block a user