📝 修复生成文档中self多出类型注解的问题,修复__init__丢失的问题

This commit is contained in:
2024-08-19 10:04:24 +08:00
parent 85a3a9ad52
commit cdbede7135
14 changed files with 170 additions and 94 deletions

View File

@ -65,7 +65,15 @@ Returns:
有两种接收工作方式,但是只能选择一种,主动接收和被动接收,主动接收使用 `receive` 方法,被动接收使用 `on_receive` 装饰器
###   ***def*** `send(self: Any, data: T) -> None`
###   ***def*** `__init__(self, _id: str, type_check: bool) -> None`
 初始化通道
Args:
_id: 通道ID
###   ***def*** `send(self, data: T) -> None`
 发送数据
@ -73,17 +81,17 @@ Args:
data: 数据
###   ***def*** `receive(self: Any) -> T`
###   ***def*** `receive(self) -> T`
 接收数据
Args:
###   ***def*** `close(self: Any) -> None`
###   ***def*** `close(self) -> None`
 关闭通道
###   ***def*** `on_receive(self: Any, filter_func: Optional[FILTER_FUNC]) -> Callable[[Callable[[T], Any]], Callable[[T], Any]]`
###   ***def*** `on_receive(self, filter_func: Optional[FILTER_FUNC]) -> Callable[[Callable[[T], Any]], Callable[[T], Any]]`
 接收数据并执行函数