rename typing.py to custom_types.py for clarity

This commit is contained in:
pacrob
2025-02-02 07:04:36 -07:00
committed by Paul Robinson
parent d0234bb183
commit e7a9ee78a8
35 changed files with 95 additions and 94 deletions

15
libp2p/custom_types.py Normal file
View File

@ -0,0 +1,15 @@
from collections.abc import (
Awaitable,
)
from typing import (
TYPE_CHECKING,
Callable,
NewType,
)
if TYPE_CHECKING:
from libp2p.network.stream.net_stream_interface import INetStream # noqa: F401
from libp2p.stream_muxer.abc import IMuxedStream # noqa: F401
TProtocol = NewType("TProtocol", str)
StreamHandlerFn = Callable[["INetStream"], Awaitable[None]]