diff --git a/src/pyramid/config/views.py b/src/pyramid/config/views.py index fad5f7ff6..67e8b42f9 100644 --- a/src/pyramid/config/views.py +++ b/src/pyramid/config/views.py @@ -833,7 +833,8 @@ def wrapper(context, request): raise ValueError('Self is only allowed when view is a class') elif inspect.isfunction(context): raise ValueError( - 'context as function is only allowed when view is a class') + 'context as function is only allowed when view is a class' + ) if is_nonstr_iter(decorator): decorator = combine_decorators(*map(self.maybe_dotted, decorator))