Skip to content

Commit 4653d95

Browse files
committed
Fix pylint errors
1 parent 309b4a7 commit 4653d95

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

sdk/ai/azure-ai-projects/azure/ai/projects/_patch.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,11 @@ def __init__(self, endpoint: str, credential: TokenCredential, **kwargs: Any) ->
9595
azure_logger.setLevel(logging.DEBUG)
9696
azure_logger.addHandler(logging.StreamHandler(stream=sys.stdout))
9797
# Exclude detailed logs for network calls associated with getting Entra ID token.
98-
identity_logger = logging.getLogger("azure.identity")
99-
identity_logger.setLevel(logging.ERROR)
98+
logging.getLogger("azure.identity").setLevel(logging.ERROR)
10099
# Make sure regular (redacted) detailed azure.core logs are not shown, as we are about to
101100
# turn on non-redacted logs by passing 'logging_enable=True' to the client constructor
102101
# (which are implemented as a separate logging policy)
103-
logger = logging.getLogger("azure.core.pipeline.policies.http_logging_policy")
104-
logger.setLevel(logging.ERROR)
102+
logging.getLogger("azure.core.pipeline.policies.http_logging_policy").setLevel(logging.ERROR)
105103

106104
kwargs.setdefault("logging_enable", self._console_logging_enabled)
107105

sdk/ai/azure-ai-projects/azure/ai/projects/aio/_patch.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,11 @@ def __init__(self, endpoint: str, credential: AsyncTokenCredential, **kwargs: An
8080
azure_logger.setLevel(logging.DEBUG)
8181
azure_logger.addHandler(logging.StreamHandler(stream=sys.stdout))
8282
# Exclude detailed logs for network calls associated with getting Entra ID token.
83-
identity_logger = logging.getLogger("azure.identity")
84-
identity_logger.setLevel(logging.ERROR)
83+
logging.getLogger("azure.identity").setLevel(logging.ERROR)
8584
# Make sure regular (redacted) detailed azure.core logs are not shown, as we are about to
8685
# turn on non-redacted logs by passing 'logging_enable=True' to the client constructor
8786
# (which are implemented as a separate logging policy)
88-
logger = logging.getLogger("azure.core.pipeline.policies.http_logging_policy")
89-
logger.setLevel(logging.ERROR)
87+
logging.getLogger("azure.core.pipeline.policies.http_logging_policy").setLevel(logging.ERROR)
9088

9189
kwargs.setdefault("logging_enable", self._console_logging_enabled)
9290

0 commit comments

Comments
 (0)