From 65d80ec11bdca424590bdf25a16ca3ec9202a8c7 Mon Sep 17 00:00:00 2001 From: lizheao Date: Thu, 27 Apr 2017 17:59:22 +0800 Subject: [PATCH] recovery the flask8 error --- sanic/blueprints.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sanic/blueprints.py b/sanic/blueprints.py index a5942d6a..79a41ab1 100644 --- a/sanic/blueprints.py +++ b/sanic/blueprints.py @@ -98,7 +98,8 @@ class Blueprint: def decorator(handler): if isinstance(handler, MethodType): - raise SanicTypeException("You can`t add a instance method as a blueprint router hander") + raise SanicTypeException("You can`t add a instance " + "method as a blueprint router handler") route = FutureRoute(handler, uri, methods, host, strict_slashes) self.routes.append(route) return handler @@ -127,7 +128,8 @@ class Blueprint: if isinstance(handler, CompositionView): methods = handler.handlers.keys() if isinstance(handler, MethodType): - raise SanicTypeException("You can`t add a instance method as a blueprint router hander") + raise SanicTypeException("You can`t add a " + "instance method as a blueprint router handler") self.route(uri=uri, methods=methods, host=host, strict_slashes=strict_slashes)(handler)