From 1bf1380b630e45a54ec58935f1c2222c03c10aca Mon Sep 17 00:00:00 2001 From: snowykami Date: Mon, 14 Oct 2024 23:27:06 +0800 Subject: [PATCH] :bug: fix uninit ctx --- croterline/process.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/croterline/process.py b/croterline/process.py index 5cf6ac6..8aad797 100644 --- a/croterline/process.py +++ b/croterline/process.py @@ -13,7 +13,12 @@ _current_ctx: "Context | None" = None # 注入当前进程上下文 class SubProcess: def __init__( - self, name: str, func: ProcessFuncType, ctx: Context = Context(), *args, **kwargs + self, + name: str, + func: ProcessFuncType, + ctx: Context = Context(), + *args, + **kwargs, ): self.name = name self.func = func