refactor: remove unnecessary underscore prefixes from function names

This commit is contained in:
Andy
2025-11-08 22:53:47 +00:00
parent 5d20bf9d52
commit 55db8da125
7 changed files with 62 additions and 44 deletions

View File

@@ -79,7 +79,7 @@ class CurlSession(Session):
)
self.log = logging.getLogger(self.__class__.__name__)
def _get_sleep_time(self, response: Response | None, attempt: int) -> float | None:
def get_sleep_time(self, response: Response | None, attempt: int) -> float | None:
if response:
retry_after = response.headers.get("Retry-After")
if retry_after:
@@ -123,7 +123,7 @@ class CurlSession(Session):
)
if attempt < self.max_retries:
if sleep_duration := self._get_sleep_time(response, attempt + 1):
if sleep_duration := self.get_sleep_time(response, attempt + 1):
if sleep_duration > 0:
time.sleep(sleep_duration)
else: