diff --git a/sanic/request.py b/sanic/request.py index 938554fc56..6435a2e0f3 100644 --- a/sanic/request.py +++ b/sanic/request.py @@ -823,11 +823,13 @@ def url_for(self, view_name: str, **kwargs) -> str: @property def scope(self) -> ASGIScope: """ - :return: The ASGI scope of the request. If the app isn't an ASGI app, then raises an exception. + :return: The ASGI scope of the request. + If the app isn't an ASGI app, then raises an exception. :rtype: Optional[ASGIScope] """ if not self.app.asgi: - raise NotImplementedError("App isn't running in ASGI mode. Scope is only available for ASGI apps.") + raise NotImplementedError("App isn't running in ASGI mode. " + "Scope is only available for ASGI apps.") return self.transport.scope