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
|
||||
"""
|
||||
if version is not None:
|
||||
version = re.escape(str(version))
|
||||
uri = "/".join(["/v{}".format(version.strip('/')), uri.lstrip('/')])
|
||||
version = re.escape(str(version).strip('/').lstrip('v'))
|
||||
uri = "/".join(["/v{}".format(version), uri.lstrip('/')])
|
||||
# add regular version
|
||||
self._add(uri, methods, handler, host, name)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user