From c7a2e18dd44dfa7c0ad58e8b3539a652f7c463bf Mon Sep 17 00:00:00 2001 From: ninemine <1371605831@qq.com> Date: Sun, 13 Jul 2025 00:32:17 +0800 Subject: [PATCH] =?UTF-8?q?BS=200.1.0=20=E4=BF=AE=E5=A4=8D=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Convention/Runtime/Config.py | 2 +- Convention/Runtime/File.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Convention/Runtime/Config.py b/Convention/Runtime/Config.py index 093323d..2bab59e 100644 --- a/Convention/Runtime/Config.py +++ b/Convention/Runtime/Config.py @@ -269,7 +269,7 @@ class global_lock_guard(lock_guard): class thread_instance(threading.Thread): def __init__( self, - call: Action[None], + call: Action, *, is_del_join: bool = True, **kwargs diff --git a/Convention/Runtime/File.py b/Convention/Runtime/File.py index b1b13a0..3b7dcb4 100644 --- a/Convention/Runtime/File.py +++ b/Convention/Runtime/File.py @@ -179,9 +179,9 @@ class ToolFile(BaseModel): self.OriginFullPath = new_current_path return self - def LoadAsJson(self) -> Any: - with open(self.OriginFullPath, 'r') as f: - json_data = json.load(f) + def LoadAsJson(self, encoding:str='utf-8', **kwargs) -> Any: + with open(self.OriginFullPath, 'r', encoding=encoding) as f: + json_data = json.load(f, **kwargs) return json_data def LoadAsCsv(self) -> pd.DataFrame: with open(self.OriginFullPath, 'r') as f: