Skip to content

Commit

Permalink
chore: 删除有关遗器模块的非必要代码
Browse files Browse the repository at this point in the history
  • Loading branch information
weiduhuo committed Nov 2, 2023
1 parent 823cb1c commit bf8c21d
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions utils/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,25 +59,10 @@ def read_json_file(filename: str, path=False, schema:dict=None) -> dict:
else:
return data
else:
if filename in [RELIC_FILE_NAME, LOADOUT_FILE_NAME, TEAM_FILE_NAME]:
init_json_file(filename)
return read_json_file(filename, path)
if path:
return {}, filename
else:
return {}


def init_json_file(filename: str):
"""
说明:
初始化json文件为空字典
参数:
:param filename: 文件名称
"""
with open(filename, "wb") as f:
log.info(_(f"{filename} 文件初始化"))
f.write(orjson.dumps({}, option = orjson.OPT_PASSTHROUGH_DATETIME | orjson.OPT_SERIALIZE_NUMPY | orjson.OPT_INDENT_2))


def modify_json_file(filename:str, key:str, value:Any) -> dict:
Expand Down

0 comments on commit bf8c21d

Please sign in to comment.