Skip to content

Commit

Permalink
Try to fix W606
Browse files Browse the repository at this point in the history
(‘async’ and ‘await’ are reserved keywords starting with Python 3.7)
  • Loading branch information
Gatsik committed Sep 23, 2021
1 parent 2a869c9 commit 57c81da
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/integration_tests/test_oauth_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,11 @@ def oauth2_server(event_loop):
@routes.post("/token")
async def token(request):
data = await request.post()
return await { # noqa: W606
grant_type_func = {
"client_credentials": client_credentials,
"refresh_token": refresh_token
}.get(data.get("grant_type"))(data)
}.get(data.get("grant_type"))
return await grant_type_func(data)

async def client_credentials(data):
if data.get("client_id") != "the_client_id" or \
Expand Down

0 comments on commit 57c81da

Please sign in to comment.