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: