Fix documentation build errors
This commit is contained in:
@@ -52,5 +52,5 @@ if __name__ == "__main__":
|
||||
" Example File: project/sanic_server.py -> app\n"
|
||||
" Example Module: project.sanic_server.app".format(e.name)
|
||||
)
|
||||
except ValueError as e:
|
||||
except ValueError:
|
||||
logger.exception("Failed to run app")
|
||||
|
||||
@@ -371,8 +371,7 @@ class Sanic:
|
||||
):
|
||||
"""Decorate a function to be registered as a websocket route
|
||||
:param uri: path of the URL
|
||||
:param subprotocols: optional list of strings with the supported
|
||||
subprotocols
|
||||
:param subprotocols: optional list of str with supported subprotocols
|
||||
:param host:
|
||||
:return: decorated function
|
||||
"""
|
||||
@@ -568,7 +567,7 @@ class Sanic:
|
||||
return self.blueprint(*args, **kwargs)
|
||||
|
||||
def url_for(self, view_name: str, **kwargs):
|
||||
"""Build a URL based on a view name and the values provided.
|
||||
r"""Build a URL based on a view name and the values provided.
|
||||
|
||||
In order to build a URL, all request parameters must be supplied as
|
||||
keyword arguments, and each parameter must pass the test for the
|
||||
@@ -579,7 +578,7 @@ class Sanic:
|
||||
the output URL's query string.
|
||||
|
||||
:param view_name: string referencing the view name
|
||||
:param \*\*kwargs: keys and values that are used to build request
|
||||
:param \**kwargs: keys and values that are used to build request
|
||||
parameters and query string arguments.
|
||||
|
||||
:return: the built URL
|
||||
|
||||
@@ -18,7 +18,7 @@ _Translator.update({ord('"'): '\\"', ord("\\"): "\\\\"})
|
||||
|
||||
|
||||
def _quote(str):
|
||||
"""Quote a string for use in a cookie header.
|
||||
r"""Quote a string for use in a cookie header.
|
||||
If the string does not need to be double-quoted, then just return the
|
||||
string. Otherwise, surround the string in doublequotes and quote
|
||||
(with a \) special characters.
|
||||
|
||||
@@ -34,7 +34,7 @@ class SanicTestClient:
|
||||
) as response:
|
||||
try:
|
||||
response.text = await response.text()
|
||||
except UnicodeDecodeError as e:
|
||||
except UnicodeDecodeError:
|
||||
response.text = None
|
||||
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user