添加对主流框架的消息io支持

This commit is contained in:
2024-08-20 06:20:41 +08:00
parent 237789e0d4
commit 0c942d9806
26 changed files with 267 additions and 192 deletions

View File

@ -60,7 +60,7 @@ class Channel(Generic[T]):
elif type_check:
if self._get_generic_type() is None:
raise TypeError("Type hint is required for enforcing type_ check.")
raise TypeError("Type hint is required for enforcing type check.")
self.type_check = type_check
def _get_generic_type(self) -> Optional[type]:
@ -158,7 +158,7 @@ class Channel(Generic[T]):
async def wrapper(data: T) -> Any:
if filter_func is not None:
if is_coroutine_callable(filter_func):
if not (await filter_func(data)): # type_: ignore
if not (await filter_func(data)): # type: ignore
return
else:
if not filter_func(data):