Skip to content

Commit 283bc9a

Browse files
committed
Apply pre-commit fixes
1 parent 941595e commit 283bc9a

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

newsfragments/3704.feature.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
Introduce ``AsyncAutoProvider`` for automatic detection of async providers (AsyncHTTP, WebSocket, AsyncIPC) and ``load_async_provider_from_uri`` / ``load_async_provider_from_environment`` helpers.
2-

web3/providers/auto.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -134,13 +134,17 @@ def load_async_provider_from_uri(
134134
``async with AsyncWeb3(WebSocketProvider(uri)) as w3: ...``
135135
"""
136136
# Import here to avoid circular imports
137-
from web3.providers.persistent import WebSocketProvider
137+
from web3.providers.persistent import (
138+
WebSocketProvider,
139+
)
138140

139141
uri = urlparse(uri_string)
140142

141143
if uri.scheme == "file":
142144
# For IPC use AsyncIPCProvider
143-
from web3.providers.persistent import AsyncIPCProvider
145+
from web3.providers.persistent import (
146+
AsyncIPCProvider,
147+
)
144148

145149
return AsyncIPCProvider(uri.path)
146150
elif uri.scheme in HTTP_SCHEMES:
@@ -391,9 +395,7 @@ def __init__(
391395
self,
392396
potential_providers: None
393397
| (
394-
Sequence[
395-
Callable[..., AsyncJSONBaseProvider] | type[AsyncJSONBaseProvider]
396-
]
398+
Sequence[Callable[..., AsyncJSONBaseProvider] | type[AsyncJSONBaseProvider]]
397399
) = None,
398400
) -> None:
399401
"""

0 commit comments

Comments
 (0)