Skip to content

Commit

Permalink
fix linter fails
Browse files Browse the repository at this point in the history
  • Loading branch information
azimovMichael committed Apr 24, 2022
1 parent ac0c58c commit 5de6ce6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sanic/request.py
Expand Up @@ -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

Expand Down

0 comments on commit 5de6ce6

Please sign in to comment.