From 9b1eb4576a3fe147d6a7306866907e6db012ac78 Mon Sep 17 00:00:00 2001 From: mahabaleshwars <147705296+mahabaleshwars@users.noreply.github.com> Date: Mon, 28 Sep 2026 19:09:35 +0530 Subject: [PATCH] Refactor isRateLimitError function for improved readability --- src/install-python.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/install-python.ts b/src/install-python.ts index 67e958a8..5a1b2929 100644 --- a/src/install-python.ts +++ b/src/install-python.ts @@ -275,9 +275,7 @@ function sleep(ms: number): Promise { // HTTP 403/429 from http-client (`statusCode`) or tool-cache (`httpStatusCode`). function isRateLimitError(err: unknown): boolean { const e = err as - | {httpStatusCode?: number; statusCode?: number} - | null - | undefined; + {httpStatusCode?: number; statusCode?: number} | null | undefined; const status = e?.httpStatusCode ?? e?.statusCode; return status === 403 || status === 429; }