Skip to content

Commit

Permalink
Fix default argument
Browse files Browse the repository at this point in the history
  • Loading branch information
DimaStebaev committed May 21, 2024
1 parent 52c91ce commit f340829
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions skale/utils/web3_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
def get_provider(
endpoint: str,
timeout: int = DEFAULT_HTTP_TIMEOUT,
request_kwargs: Dict[str, Any] = {'max_size': WS_MAX_MESSAGE_DATA_BYTES}
request_kwargs: Dict[str, Any] | None = None
) -> JSONBaseProvider:
scheme = urlparse(endpoint).scheme
if scheme == 'ws' or scheme == 'wss':
Expand All @@ -72,7 +72,7 @@ def get_provider(
websocket_kwargs=kwargs)

if scheme == 'http' or scheme == 'https':
kwargs = {'timeout': timeout, **request_kwargs}
kwargs = {'timeout': timeout, **(request_kwargs or {})}
return HTTPProvider(endpoint, request_kwargs=kwargs)

raise Exception(
Expand Down

0 comments on commit f340829

Please sign in to comment.