chore: totally fix lint issues
This commit is contained in:
@@ -6,17 +6,17 @@ from typing import Dict, Union
|
||||
MusicDBType = Dict[int, Dict[str, Union[int, str]]]
|
||||
|
||||
# 将 '__all__' 用于模块导出声明
|
||||
__all__ = ['musicDB']
|
||||
__all__ = ["musicDB"]
|
||||
|
||||
# 读取并解析 JSON 文件
|
||||
try:
|
||||
with open(musicDBPath, 'r', encoding='utf-8') as f:
|
||||
with open(musicDBPath, "r", encoding="utf-8") as f:
|
||||
data = json.load(f)
|
||||
except FileNotFoundError:
|
||||
try:
|
||||
with open(musicDBPathFallback, 'r', encoding='utf-8') as f:
|
||||
with open(musicDBPathFallback, "r", encoding="utf-8") as f:
|
||||
data = json.load(f)
|
||||
except:
|
||||
except Exception:
|
||||
raise FileNotFoundError("musicDB.json 文件不存在!")
|
||||
|
||||
# 将 JSON 数据转换为指定格式的字典
|
||||
|
||||
Reference in New Issue
Block a user