Skip to content

Commit 90da0a6

Browse files
authored
useless-disable (Azure#39064)
1 parent a04b30b commit 90da0a6

File tree

18 files changed

+24
-25
lines changed

18 files changed

+24
-25
lines changed

sdk/identity/azure-identity/azure/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@
22
# Copyright (c) Microsoft Corporation.
33
# Licensed under the MIT License.
44
# ------------------------------------
5-
# pylint:disable=missing-docstring
65
__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def get_token(
8585
attribute gives a reason. Any error response from Microsoft Entra ID is available as the error's
8686
``response`` attribute.
8787
"""
88-
# pylint:disable=useless-super-delegation
88+
8989
return super(AuthorizationCodeCredential, self).get_token(
9090
*scopes, claims=claims, tenant_id=tenant_id, client_secret=self._client_secret, **kwargs
9191
)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ def _run_command(command: str, timeout: int) -> str:
278278
# failed to execute 'cmd' or '/bin/sh'
279279
error = CredentialUnavailableError(message="Failed to execute '{}'".format(args[0]))
280280
raise error from ex
281-
except Exception as ex: # pylint:disable=broad-except
281+
except Exception as ex:
282282
# could be a timeout, for example
283283
error = CredentialUnavailableError(message="Failed to invoke the Azure Developer CLI")
284284
raise error from ex

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def _get_secret_key(response: PipelineResponse) -> str:
5454
with open(key_file, "r", encoding="utf-8") as file:
5555
try:
5656
return file.read()
57-
except Exception as error: # pylint:disable=broad-except
57+
except Exception as error:
5858
# user is expected to have obtained read permission prior to this being called
5959
raise ClientAuthenticationError(
6060
message="Could not read file {} contents: {}".format(key_file, error)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ def _run_command(command: str, timeout: int) -> str:
269269
# failed to execute 'cmd' or '/bin/sh'
270270
error = CredentialUnavailableError(message="Failed to execute '{}'".format(args[0]))
271271
raise error from ex
272-
except Exception as ex: # pylint:disable=broad-except
272+
except Exception as ex:
273273
# could be a timeout, for example
274274
error = CredentialUnavailableError(message="Failed to invoke the Azure CLI")
275275
raise error from ex

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ def run_command_line(command_line: List[str], timeout: int) -> str:
192192
proc = start_process(command_line)
193193
stdout, stderr = proc.communicate(**kwargs)
194194

195-
except Exception as ex: # pylint:disable=broad-except
195+
except Exception as ex:
196196
# failed to execute "cmd" or "/bin/sh", or timed out; PowerShell and Az.Account may or may not be installed
197197
# (handling Exception here because subprocess.SubprocessError and .TimeoutExpired were added in 3.3)
198198
if proc and not proc.returncode:

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def _request_token(self, *scopes: str, **kwargs: Any) -> AccessTokenInfo:
8989
# IMDS responded
9090
_check_forbidden_response(ex)
9191
self._endpoint_available = True
92-
except Exception as ex: # pylint:disable=broad-except
92+
except Exception as ex:
9393
error_message = (
9494
"ManagedIdentityCredential authentication unavailable, no response from the IMDS endpoint."
9595
)
@@ -119,7 +119,7 @@ def _request_token(self, *scopes: str, **kwargs: Any) -> AccessTokenInfo:
119119
raise ClientAuthenticationError(message=ex.message, response=ex.response) from ex
120120
except json.decoder.JSONDecodeError as ex:
121121
raise CredentialUnavailableError(message="ManagedIdentityCredential authentication unavailable.") from ex
122-
except Exception as ex: # pylint:disable=broad-except
122+
except Exception as ex:
123123
# if anything else was raised, assume the endpoint is unavailable
124124
error_message = "ManagedIdentityCredential authentication unavailable, no response from the IMDS endpoint."
125125
raise CredentialUnavailableError(error_message) from ex

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def do_GET(self):
2828

2929
self.wfile.write(b"Authentication complete. You can close this window.")
3030

31-
def log_message(self, format, *args): # pylint: disable=redefined-builtin,unused-argument
31+
def log_message(self, format, *args): # pylint: disable=redefined-builtin
3232
pass # this prevents server dumping messages to stdout
3333

3434

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def wrapper(*args, **kwargs):
4242
except Exception as ex: # pylint: disable=broad-except
4343
_LOGGER.debug("Failed to log the account information: %s", ex, exc_info=True)
4444
return token
45-
except Exception as ex: # pylint: disable=broad-except
45+
except Exception as ex:
4646
_LOGGER.log(
4747
logging.DEBUG if within_credential_chain.get() else logging.WARNING,
4848
"%s failed: %s",
@@ -70,7 +70,7 @@ def wrapper(*args, **kwargs):
7070
return fn(*args, **kwargs)
7171
except ClientAuthenticationError:
7272
raise
73-
except Exception as ex: # pylint:disable=broad-except
73+
except Exception as ex:
7474
auth_error = ClientAuthenticationError(message="Authentication failed: {}".format(ex))
7575
raise auth_error from ex
7676

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ def _get_token_base(
224224

225225
# this may be the first authentication, or the user may have authenticated a different identity
226226
self._auth_record = _build_auth_record(result)
227-
except Exception as ex: # pylint:disable=broad-except
227+
except Exception as ex:
228228
_LOGGER.warning(
229229
"%s.%s failed: %s",
230230
self.__class__.__name__,

0 commit comments

Comments
 (0)