Skip to content

Commit 9af398d

Browse files
authored
[Identity] Update for next-pylint (#40205)
Signed-off-by: Paul Van Eck <[email protected]>
1 parent 37f4f54 commit 9af398d

File tree

7 files changed

+11
-12
lines changed

7 files changed

+11
-12
lines changed

sdk/identity/azure-identity/azure/identity/_credentials/service_fabric.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def _get_client_args(**kwargs: Any) -> Optional[Dict]:
4949
return dict(
5050
kwargs,
5151
base_headers={"Secret": secret},
52-
connection_verify=False,
52+
connection_verify=False, # pylint: disable=do-not-hardcode-connection-verify
5353
request_factory=functools.partial(_get_request, url),
5454
)
5555

sdk/identity/azure-identity/azure/identity/_internal/auth_code_redirect_handler.py

+3-5
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,13 @@ def log_message(self, format, *args): # pylint: disable=redefined-builtin
3535
class AuthCodeRedirectServer(HTTPServer):
3636
"""HTTP server that listens for the redirect request following an authorization code authentication"""
3737

38-
query_params = {} # type: Mapping[str, Any]
38+
query_params: Mapping[str, Any] = {}
3939

40-
def __init__(self, hostname, port, timeout):
41-
# type: (str, int, int) -> None
40+
def __init__(self, hostname: str, port: int, timeout: int) -> None:
4241
HTTPServer.__init__(self, (hostname, port), AuthCodeRedirectHandler)
4342
self.timeout = timeout
4443

45-
def wait_for_redirect(self):
46-
# type: () -> Mapping[str, Any]
44+
def wait_for_redirect(self) -> Mapping[str, Any]:
4745
while not self.query_params:
4846
try:
4947
self.handle_request()

sdk/identity/azure-identity/azure/identity/_persistent_cache.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,9 @@ def _load_persistent_cache(
6767
return msal_extensions.PersistedTokenCache(persistence)
6868

6969

70-
def _get_persistence(allow_unencrypted, account_name, cache_name):
71-
# type: (bool, str, str) -> msal_extensions.persistence.BasePersistence
70+
def _get_persistence(
71+
allow_unencrypted: bool, account_name: str, cache_name: str
72+
) -> "msal_extensions.persistence.BasePersistence":
7273
"""Get an msal_extensions persistence instance for the current platform.
7374
7475
On Windows the cache is a file protected by the Data Protection API. On Linux and macOS the cache is stored by

sdk/identity/azure-identity/azure/identity/aio/_credentials/azd_cli.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Copyright (c) Microsoft Corporation.
33
# Licensed under the MIT License.
44
# ------------------------------------
5-
import asyncio
5+
import asyncio # pylint: disable=do-not-import-asyncio
66
import logging
77
import os
88
import shutil

sdk/identity/azure-identity/azure/identity/aio/_credentials/azure_cli.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Copyright (c) Microsoft Corporation.
33
# Licensed under the MIT License.
44
# ------------------------------------
5-
import asyncio
5+
import asyncio # pylint: disable=do-not-import-asyncio
66
import logging
77
import os
88
import shutil

sdk/identity/azure-identity/azure/identity/aio/_credentials/azure_powershell.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Copyright (c) Microsoft Corporation.
33
# Licensed under the MIT License.
44
# ------------------------------------
5-
import asyncio
5+
import asyncio # pylint: disable=do-not-import-asyncio
66
import sys
77
from typing import Any, cast, List, Optional
88
from azure.core.credentials import AccessToken, AccessTokenInfo, TokenRequestOptions

sdk/identity/azure-identity/azure/identity/aio/_credentials/chained.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Copyright (c) Microsoft Corporation.
33
# Licensed under the MIT License.
44
# ------------------------------------
5-
import asyncio
5+
import asyncio # pylint: disable=do-not-import-asyncio
66
import logging
77
from typing import Any, Optional, cast
88

0 commit comments

Comments
 (0)