1
0
forked from bot/app

📝 修复生成文档中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

@ -19,6 +19,10 @@ Returns:
###   ***def*** `__init__(self) -> None`
 轻雪生命周期管理,启动、停止、重启
###   ***@staticmethod***
###   ***def*** `run_funcs(funcs: list[LIFESPAN_FUNC | PROCESS_LIFESPAN_FUNC]) -> None`
@ -30,7 +34,7 @@ Args:
Returns:
###   ***def*** `on_before_start(self: Any, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC`
###   ***def*** `on_before_start(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC`
 注册启动时的函数
@ -42,7 +46,7 @@ Returns:
LIFESPAN_FUNC:
###   ***def*** `on_after_start(self: Any, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC`
###   ***def*** `on_after_start(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC`
 注册启动时的函数
@ -54,7 +58,7 @@ Returns:
LIFESPAN_FUNC:
###   ***def*** `on_before_process_shutdown(self: Any, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC`
###   ***def*** `on_before_process_shutdown(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC`
 注册停止前的函数
@ -66,7 +70,7 @@ Returns:
LIFESPAN_FUNC:
###   ***def*** `on_after_shutdown(self: Any, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC`
###   ***def*** `on_after_shutdown(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC`
 注册停止后的函数
@ -80,7 +84,7 @@ Returns:
LIFESPAN_FUNC:
###   ***def*** `on_before_process_restart(self: Any, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC`
###   ***def*** `on_before_process_restart(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC`
 注册重启时的函数
@ -92,7 +96,7 @@ Returns:
LIFESPAN_FUNC:
###   ***def*** `on_after_restart(self: Any, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC`
###   ***def*** `on_after_restart(self, func: LIFESPAN_FUNC) -> LIFESPAN_FUNC`
 注册重启后的函数
@ -104,7 +108,7 @@ Returns:
LIFESPAN_FUNC:
###   ***def*** `on_after_nonebot_init(self: Any, func: Any) -> None`
###   ***def*** `on_after_nonebot_init(self, func: Any) -> None`
 注册 NoneBot 初始化后的函数
@ -116,37 +120,37 @@ Args:
Returns:
###   ***def*** `before_start(self: Any) -> None`
###   ***def*** `before_start(self) -> None`
 启动前
Returns:
###   ***def*** `after_start(self: Any) -> None`
###   ***def*** `after_start(self) -> None`
 启动后
Returns:
###   ***def*** `before_process_shutdown(self: Any) -> None`
###   ***def*** `before_process_shutdown(self) -> None`
 停止前
Returns:
###   ***def*** `after_shutdown(self: Any) -> None`
###   ***def*** `after_shutdown(self) -> None`
 停止后
Returns:
###   ***def*** `before_process_restart(self: Any) -> None`
###   ***def*** `before_process_restart(self) -> None`
 重启前
Returns:
###   ***def*** `after_restart(self: Any) -> None`
###   ***def*** `after_restart(self) -> None`
 重启后