Added removing duplicate 'v' for Router.add()
version parameter
Fix sanic/router.py:123:80: E501 line too long (80 > 79 characters)
This commit is contained in:
parent
8e7475ccf6
commit
76511d61e0
|
@ -119,8 +119,8 @@ class Router:
|
||||||
:return: Nothing
|
:return: Nothing
|
||||||
"""
|
"""
|
||||||
if version is not None:
|
if version is not None:
|
||||||
version = re.escape(str(version))
|
version = re.escape(str(version).strip('/').lstrip('v'))
|
||||||
uri = "/".join(["/v{}".format(version.strip('/')), uri.lstrip('/')])
|
uri = "/".join(["/v{}".format(version), uri.lstrip('/')])
|
||||||
# add regular version
|
# add regular version
|
||||||
self._add(uri, methods, handler, host, name)
|
self._add(uri, methods, handler, host, name)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user