Skip to content

Commit

Permalink
Fix for Python 3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
SkyEye-FAST committed Jan 27, 2024
1 parent f3f3897 commit a3c6b35
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pylint flask requests fonttools
pip install -r requirement.txt
- name: Analysing the code with pylint
run: |
pylint $(git ls-files '*.py')
18 changes: 4 additions & 14 deletions base.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,13 @@

import re
import json
import sys
import tomllib as tl
from pathlib import Path

# 当前绝对路径
P = Path(__file__).resolve().parent
# 语言文件文件夹
LANG_DIR = Path(__file__).resolve().parent / "lang"

# 加载配置
CONFIG_DIR = P / "configuration.toml"
if not CONFIG_DIR.exists():
print("\n无法找到配置文件,请将配置文件放置在与此脚本同级的目录下。")
sys.exit()
with open(CONFIG_DIR, "rb") as f:
config = tl.load(f)

LANG_DIR = P / config["language_folder"]
IGNORE_SUPPLEMENTS = config["ignore_supplements"]
# 是否忽略补充字符串
IGNORE_SUPPLEMENTS = True

# 读取语言文件
print("开始读取语言文件。")
Expand Down
5 changes: 0 additions & 5 deletions configuration.toml

This file was deleted.

0 comments on commit a3c6b35

Please sign in to comment.