Commit 3a51a583 authored by Yan Zhaojun's avatar Yan Zhaojun
Browse files

update

parent 1ab161c4
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@ def get_version():
    # 读取文件内容,使用正则找出版本号
    with open(init_path, "r", encoding="utf-8") as f:
        content = f.read()
        version_match = re.search(r'^__version__ = ["\']([^"\']*)["\']', content, re.M)
        version_match = re.search(r'^__version__ ?= ?["\']([^"\']*)["\']', content, re.M)
        if version_match:
            return version_match.group(1)
        raise RuntimeError("无法在 __init__.py 中找到 __version__ 定义")