Replace pylint broad-except with Ruff BLE001 (#116250)

This commit is contained in:
Sid 2024-05-07 14:00:27 +02:00 committed by GitHub
parent b35fbd8d20
commit 2cc916db6d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
335 changed files with 459 additions and 459 deletions

View file

@ -106,7 +106,7 @@ async def _async_wrapper(
"""Catch and log exception."""
try:
await async_func(*args)
except Exception: # pylint: disable=broad-except
except Exception: # noqa: BLE001
log_exception(format_err, *args)
@ -116,7 +116,7 @@ def _sync_wrapper(
"""Catch and log exception."""
try:
func(*args)
except Exception: # pylint: disable=broad-except
except Exception: # noqa: BLE001
log_exception(format_err, *args)
@ -127,7 +127,7 @@ def _callback_wrapper(
"""Catch and log exception."""
try:
func(*args)
except Exception: # pylint: disable=broad-except
except Exception: # noqa: BLE001
log_exception(format_err, *args)
@ -179,7 +179,7 @@ def catch_log_coro_exception(
"""Catch and log exception."""
try:
return await target
except Exception: # pylint: disable=broad-except
except Exception: # noqa: BLE001
log_exception(format_err, *args)
return None