From ed0d33ccdf5ab08b9f89745caf5eea6a252151de Mon Sep 17 00:00:00 2001 From: jiasli <4003950+jiasli@users.noreply.github.com> Date: Fri, 7 May 2021 14:58:08 +0800 Subject: [PATCH 1/2] Fix linter error in `_github_oauth.py` --- .../azure/cli/command_modules/appservice/_github_oauth.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/azure-cli/azure/cli/command_modules/appservice/_github_oauth.py b/src/azure-cli/azure/cli/command_modules/appservice/_github_oauth.py index b1c28159f10..aa57aac828d 100644 --- a/src/azure-cli/azure/cli/command_modules/appservice/_github_oauth.py +++ b/src/azure-cli/azure/cli/command_modules/appservice/_github_oauth.py @@ -17,7 +17,7 @@ ''' -def get_github_access_token(cmd, scope_list=None): +def get_github_access_token(cmd, scope_list=None): # pylint:disable=unused-import if scope_list: for scope in scope_list: if scope not in GITHUB_OAUTH_SCOPES: @@ -30,11 +30,9 @@ def get_github_access_token(cmd, scope_list=None): 'client_id': GITHUB_OAUTH_CLIENT_ID } - import base64 - import json import requests import time - from urllib.parse import urlparse, parse_qs + from urllib.parse import parse_qs try: response = requests.post(authorize_url, data=authorize_url_data) From 54cda8834d1f744137609ac1e25eab6e6a821a01 Mon Sep 17 00:00:00 2001 From: Jiashuo Li <4003950+jiasli@users.noreply.github.com> Date: Fri, 7 May 2021 15:37:44 +0800 Subject: [PATCH 2/2] Update _github_oauth.py --- .../azure/cli/command_modules/appservice/_github_oauth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/azure-cli/azure/cli/command_modules/appservice/_github_oauth.py b/src/azure-cli/azure/cli/command_modules/appservice/_github_oauth.py index aa57aac828d..5f18c69e349 100644 --- a/src/azure-cli/azure/cli/command_modules/appservice/_github_oauth.py +++ b/src/azure-cli/azure/cli/command_modules/appservice/_github_oauth.py @@ -17,7 +17,7 @@ ''' -def get_github_access_token(cmd, scope_list=None): # pylint:disable=unused-import +def get_github_access_token(cmd, scope_list=None): # pylint: disable=unused-argument if scope_list: for scope in scope_list: if scope not in GITHUB_OAUTH_SCOPES: