Skip to content

Commit 9b6e9f2

Browse files
committed
Address linting issues.
1 parent ce5e8a3 commit 9b6e9f2

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed
Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
1-
from azure.core.credentials import TokenCredential
1+
# --------------------------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
# --------------------------------------------------------------------------------------------
5+
6+
# pylint: disable=too-few-public-methods
27
from azure.cli.core.auth.util import resource_to_scopes
38

4-
# Enable passing in custom token audience that takes precedence over SDK's hardcoded audience.
9+
10+
# This class is used to pass in custom token audience that will be respected by the SDK.
511
# Users can configure an audience based on their cloud.
6-
class AppConfigurationCliCredential(TokenCredential):
12+
class AppConfigurationCliCredential:
713

8-
def __init__(self, credential: TokenCredential, resource: str = None):
14+
def __init__(self, credential, resource: str = None):
915
self._impl = credential
1016
self._resource = resource
11-
17+
1218
def get_token(self, *scopes, **kwargs):
1319

1420
if self._resource is not None:
1521
scopes = resource_to_scopes(self._resource)
1622

17-
return self._impl.get_token(*scopes, **kwargs)
23+
return self._impl.get_token(*scopes, **kwargs)

src/azure-cli/azure/cli/command_modules/appconfig/_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ def get_appconfig_data_client(cmd, name, connection_string, auth_mode, endpoint)
188188
token_audience = current_cloud.endpoints.appconfig_auth_token_audience
189189

190190
try:
191-
azconfig_client = AzureAppConfigurationClient(credential=AppConfigurationCliCredential(cred._credential, token_audience),
191+
azconfig_client = AzureAppConfigurationClient(credential=AppConfigurationCliCredential(cred._credential, token_audience), # pylint: disable=protected-access
192192
base_url=endpoint,
193193
user_agent=HttpHeaders.USER_AGENT)
194194
except (ValueError, TypeError) as ex:

0 commit comments

Comments
 (0)