Skip to content

Commit 1db2d26

Browse files
committed
feat(DEVC-1752): fix lint
1 parent 05662ac commit 1db2d26

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

src/corva/api.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import json
22
import posixpath
33
import re
4-
54
from typing import List, Optional, Sequence, Union
65

76
import requests
7+
from urllib3 import Retry
88

99
from corva.api_utils import get_retry_strategy, get_requests_session
1010
from corva.configuration import SETTINGS
@@ -35,8 +35,10 @@ def __init__(
3535
self.api_key = api_key
3636
self.app_key = app_key
3737
self.app_connection_id = app_connection_id
38-
self._retry_strategy = get_retry_strategy(max_retries) if max_retries not in (None, 0) else None
39-
self._session = get_requests_session(
38+
self._retry_strategy: Optional[Retry] = (
39+
get_retry_strategy(max_retries) if max_retries not in (None, 0) else None
40+
)
41+
self._session: requests.Session = get_requests_session(
4042
retry_strategy=self._retry_strategy,
4143
pool_connections_count=pool_connections_count,
4244
pool_max_size=pool_max_size,

src/corva/configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class Settings(pydantic.BaseSettings):
2626
# keep-alive
2727
POOL_CONNECTIONS_COUNT: int = 20 # Total pools count
2828
POOL_MAX_SIZE: int = 20 # Max connections count per pool/host
29-
POOL_BLOCK: bool = True # If all conn ack - wait until pool connection released, do not throw exc
29+
POOL_BLOCK: bool = True # If all conn ack - wait until pool connection released
3030

3131
# retry
3232
MAX_RETRY_COUNT: int = 3 # If `0` then retires will be disabled

0 commit comments

Comments
 (0)