@@ -79,10 +79,10 @@ def converted(communicator: kiwipy.Communicator, *args: Any, **kwargs: Any) -> k
79
79
return converted
80
80
81
81
82
- T = TypeVar ('T ' , bound = kiwipy .Communicator )
82
+ CommT = TypeVar ('CommT ' , bound = kiwipy .Communicator )
83
83
84
84
85
- def wrap_communicator (communicator : T , loop : Optional [asyncio .AbstractEventLoop ] = None ) -> 'LoopCommunicator[T ]' :
85
+ def wrap_communicator (communicator : CommT , loop : Optional [asyncio .AbstractEventLoop ] = None ) -> 'LoopCommunicator[CommT ]' :
86
86
"""
87
87
Wrap a communicator such that all callbacks made to any subscribers are scheduled on the
88
88
given event loop.
@@ -103,10 +103,10 @@ def wrap_communicator(communicator: T, loop: Optional[asyncio.AbstractEventLoop]
103
103
104
104
105
105
@final
106
- class LoopCommunicator (Generic [T ], kiwipy .Communicator ): # type: ignore
106
+ class LoopCommunicator (Generic [CommT ], kiwipy .Communicator ): # type: ignore
107
107
"""Wrapper around a `kiwipy.Communicator` that schedules any subscriber messages on a given event loop."""
108
108
109
- def __init__ (self , communicator : T , loop : Optional [asyncio .AbstractEventLoop ] = None ):
109
+ def __init__ (self , communicator : CommT , loop : Optional [asyncio .AbstractEventLoop ] = None ):
110
110
"""
111
111
:param communicator: The kiwipy communicator
112
112
:param loop: The event loop to schedule callbacks on
@@ -118,7 +118,7 @@ def __init__(self, communicator: T, loop: Optional[asyncio.AbstractEventLoop] =
118
118
self ._loop : asyncio .AbstractEventLoop = loop or asyncio .get_event_loop ()
119
119
120
120
@property
121
- def inner (self ) -> T :
121
+ def inner (self ) -> CommT :
122
122
return self ._communicator
123
123
124
124
def loop (self ) -> asyncio .AbstractEventLoop :
0 commit comments