From e0d71086417c18bbf56f67565c33f324f3ee5b29 Mon Sep 17 00:00:00 2001 From: "getsantry[bot]" <66042841+getsantry[bot]@users.noreply.github.com> Date: Tue, 23 Jul 2024 00:49:45 +0000 Subject: [PATCH] :hammer_and_wrench: apply pre-commit fixes --- src/sentry/utils/circuit_breaker2.py | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/src/sentry/utils/circuit_breaker2.py b/src/sentry/utils/circuit_breaker2.py index 0bc00388812b11..cbf870d50137a4 100644 --- a/src/sentry/utils/circuit_breaker2.py +++ b/src/sentry/utils/circuit_breaker2.py @@ -326,13 +326,16 @@ def _get_state_and_remaining_time( @overload def _get_controlling_quota( self, state: Literal[CircuitBreakerState.OK, CircuitBreakerState.RECOVERY] - ) -> Quota: ... + ) -> Quota: + ... @overload - def _get_controlling_quota(self, state: Literal[CircuitBreakerState.BROKEN]) -> None: ... + def _get_controlling_quota(self, state: Literal[CircuitBreakerState.BROKEN]) -> None: + ... @overload - def _get_controlling_quota(self) -> Quota | None: ... + def _get_controlling_quota(self) -> Quota | None: + ... def _get_controlling_quota(self, state: CircuitBreakerState | None = None) -> Quota | None: """ @@ -350,19 +353,24 @@ def _get_controlling_quota(self, state: CircuitBreakerState | None = None) -> Qu return controlling_quota_by_state[_state] @overload - def _get_remaining_error_quota(self, quota: None, window_end: int | None) -> None: ... + def _get_remaining_error_quota(self, quota: None, window_end: int | None) -> None: + ... @overload - def _get_remaining_error_quota(self, quota: Quota, window_end: int | None) -> int: ... + def _get_remaining_error_quota(self, quota: Quota, window_end: int | None) -> int: + ... @overload - def _get_remaining_error_quota(self, quota: None) -> None: ... + def _get_remaining_error_quota(self, quota: None) -> None: + ... @overload - def _get_remaining_error_quota(self, quota: Quota) -> int: ... + def _get_remaining_error_quota(self, quota: Quota) -> int: + ... @overload - def _get_remaining_error_quota(self) -> int | None: ... + def _get_remaining_error_quota(self) -> int | None: + ... def _get_remaining_error_quota( self, quota: Quota | None = None, window_end: int | None = None