ruff: Fix UP038 Use X | Y in isinstance call instead of (X, Y).

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2024-07-11 17:30:27 -07:00
committed by Tim Abbott
parent 0fa5e7f629
commit 1464009fae
7 changed files with 10 additions and 10 deletions

View File

@@ -100,7 +100,7 @@ def sentry_tunnel(
# failing to connect at the TCP level will report as
# ProxyErrors.
def open_circuit_for(exc_type: type[Exception], exc_value: Exception) -> bool:
if issubclass(exc_type, (ProxyError, Timeout)):
if issubclass(exc_type, ProxyError | Timeout):
return True
if isinstance(exc_value, HTTPError):
response = exc_value.response