Skip to content

improve: embed res#215

Merged
LY-Xiang merged 4 commits into
LL1.2.4from
improve/import
Aug 3, 2025
Merged

improve: embed res#215
LY-Xiang merged 4 commits into
LL1.2.4from
improve/import

Conversation

@LY-Xiang
Copy link
Copy Markdown
Collaborator

@LY-Xiang LY-Xiang commented Aug 3, 2025

get datafiles path from importlib

Sourcery 总结

通过利用 importlib.resources 改进资源嵌入,重构 install_windows.py 以保持一致性,并更新 CI 和依赖项以支持新的嵌入式数据工作流。

新功能:

  • 使用 importlib.resources 嵌入资源目录,以定位捆绑的数据文件

改进:

  • 重构代码以实现字符串引用、换行和参数分组的一致性
  • 通过统一路径处理,标准化下载和提取逻辑
  • 将自定义的外部数据检测替换为基于 importlib 的解析

构建:

  • 更新依赖项,提高 requestspsutilrichnuitkapyinstaller 的版本

CI:

  • 修改 Windows 工作流,使其使用 python3 pip 命令,设置 PYTHONOPTIMIZATION,创建一个用于嵌入的“data”包,更新缓存路径,并调整 PyInstaller 和 Nuitka 的构建命令
Original summary in English

Summary by Sourcery

Improve resource embedding by leveraging importlib.resources, refactor install_windows.py for consistency, and update CI and dependencies to support the new embedded data workflow.

New Features:

  • Embed resource directory using importlib.resources to locate bundled data files

Enhancements:

  • Refactor code for consistent string quoting, line breaks, and parameter grouping
  • Standardize download and extraction logic with unified path handling
  • Replace custom external data detection with importlib-based resolution

Build:

  • Update requirements to bump versions of requests, psutil, rich, nuitka, and pyinstaller

CI:

  • Revise Windows workflow to use python3 pip commands, set PYTHONOPTIMIZATION, create a 'data' package for embedding, update cache paths, and adjust build commands for PyInstaller and Nuitka

@LY-Xiang LY-Xiang requested a review from Mzdyl August 3, 2025 13:17
@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai Bot commented Aug 3, 2025

审阅者指南

此 PR 通过用 importlib.resources 替换自定义文件扫描来集成嵌入式资源处理,更新 Windows CI 工作流程以透明地打包新的数据模块,统一 install_windows.py 中的代码风格,优化用户提示和静默安装逻辑,并提升了多个依赖版本。

使用 importlib.resources 处理嵌入式资源的类图

classDiagram
    class install_windows {
        +get_external_data_path()
    }
    class importlib.resources {
        +files()
    }
    install_windows ..> importlib.resources : uses
    install_windows : - get_external_data_path() now uses importlib.resources.files("data")
Loading

文件级更改

更改 详情 文件
使用 importlib.resources 定位嵌入式数据目录
  • 用 importlib.resources.files("data") 替换自定义的 PyInstaller/Nuitka 外部数据扫描
  • 用 try/except 回退包装,以返回 None
  • 移除遗留的 zip 扫描代码
install_windows.py
在 CI 构建工作流程中嵌入并包含数据文件夹
  • 在工作流程中初始化 data/ 模块和 init.py
  • 使用 python3 进行 pip 安装并设置 PYTHONOPTIMIZATION
  • 为每个构建器定义缓存,包括 dist 路径,更新恢复/保存键
  • 调整 Nuitka 标志以使用 --include-raw-dir=data/,PyInstaller 使用 add-data data/:data/
.github/workflows/windows.yml
统一代码格式和字符串引用
  • 统一单引号为双引号并添加尾随逗号
  • 将长参数列表折行
  • 移除被注释掉的打印语句并去除多余空格
  • 确保 os.path.join 使用一致
install_windows.py
优化用户提示和静默安装逻辑
  • 更新 countdown_input 的默认引用和提示格式
  • 通过设置 config.timeout=0 来遵守 --silent 选项
  • 在 GitHub Actions 之外将 exit() 切换为 sys.exit()
  • 使用一致的引用构建环境变量命令
install_windows.py
更新依赖版本约束
  • 将 requests 提升到 2.32,psutil 提升到 7.0,rich 提升到 14.1
  • 将 nuitka 升级到 2.7,pyinstaller 升级到 6.14
requirements.txt

提示和命令

与 Sourcery 交互

  • 触发新审阅: 在拉取请求上评论 @sourcery-ai review
  • 继续讨论: 直接回复 Sourcery 的审阅评论。
  • 从审阅评论生成 GitHub issue: 通过回复审阅评论,请求 Sourcery 从中创建 issue。您也可以回复审阅评论并带上 @sourcery-ai issue 来创建 issue。
  • 生成拉取请求标题: 在拉取请求标题的任意位置写入 @sourcery-ai 即可随时生成标题。您也可以在拉取请求上评论 @sourcery-ai title 来随时(重新)生成标题。
  • 生成拉取请求摘要: 在拉取请求正文的任意位置写入 @sourcery-ai summary 即可随时随地生成 PR 摘要。您也可以在拉取请求上评论 @sourcery-ai summary 来随时(重新)生成摘要。
  • 生成审阅者指南: 在拉取请求上评论 @sourcery-ai guide 即可随时(重新)生成审阅者指南。
  • 解决所有 Sourcery 评论: 在拉取请求上评论 @sourcery-ai resolve 以解决所有 Sourcery 评论。如果您已处理完所有评论且不想再看到它们,此功能非常有用。
  • 驳回所有 Sourcery 审阅: 在拉取请求上评论 @sourcery-ai dismiss 以驳回所有现有 Sourcery 审阅。如果您想重新开始新的审阅,此功能特别有用——别忘了评论 @sourcery-ai review 以触发新的审阅!

自定义您的体验

访问您的仪表板以:

  • 启用或禁用审阅功能,例如 Sourcery 生成的拉取请求摘要、审阅者指南等。
  • 更改审阅语言。
  • 添加、删除或编辑自定义审阅说明。
  • 调整其他审阅设置。

获取帮助

Original review guide in English

Reviewer's Guide

This PR integrates embedded resource handling by replacing custom file scanning with importlib.resources, updates Windows CI workflows to package the new data module transparently, standardizes code style across install_windows.py, refines user prompts and silent-install logic, and bumps several dependency versions.

Class diagram for embedded resource handling with importlib.resources

classDiagram
    class install_windows {
        +get_external_data_path()
    }
    class importlib.resources {
        +files()
    }
    install_windows ..> importlib.resources : uses
    install_windows : - get_external_data_path() now uses importlib.resources.files("data")
Loading

File-Level Changes

Change Details Files
Use importlib.resources to locate embedded data directory
  • Replace custom PyInstaller/Nuitka external data scanning with importlib.resources.files("data")
  • Wrap in try/except fallback to return None
  • Remove legacy zip-scanning code
install_windows.py
Embed and include data folder in CI build workflows
  • Initialize data/ module and init.py in workflow
  • Use python3 for pip installs and set PYTHONOPTIMIZATION
  • Define cache per builder including dist path, update restore/save keys
  • Adjust Nuitka flags to use --include-raw-dir=data/, and PyInstaller to add-data data/:data/
.github/workflows/windows.yml
Standardize code formatting and string quoting
  • Unify single to double quotes and add trailing commas
  • Wrap long argument lists across multiple lines
  • Remove commented-out prints and trim whitespace
  • Ensure consistent os.path.join usage
install_windows.py
Refine user prompts and silent-install logic
  • Update countdown_input default quoting and prompt formatting
  • Honor --silent by setting config.timeout=0
  • Switch from exit() to sys.exit() outside GitHub Actions
  • Build environment variable commands with consistent quoting
install_windows.py
Update dependency version constraints
  • Bump requests to 2.32, psutil to 7.0, rich to 14.1
  • Upgrade nuitka to 2.7 and pyinstaller to 6.14
requirements.txt

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

sourcery-ai[bot]
sourcery-ai Bot previously requested changes Aug 3, 2025
Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LY-Xiang - 我已经审阅了你的更改 - 这里有一些反馈:

阻塞性问题

  • 发现 'importlib.resources',这是一个只在 Python 3.7+ 中可用的模块。这在较低版本中不起作用,因此不向后兼容。请使用 importlib_resources 代替以支持较旧的 Python 版本。(链接)
  • 发现系统调用中使用了动态内容。如果外部数据可以到达此函数调用,这是危险的,因为它允许恶意行为者执行命令。请改用 'subprocess' 模块,它更容易使用,而不会意外地暴露命令注入漏洞。(链接)

一般性评论

  • 确保你的 PyInstaller 和 Nuitka 构建步骤明确包含 data 包(例如使用 --add-data--include-raw-dir),以便 importlib.resources.files('data') 能够实际找到你的嵌入式 ZIP 文件。
  • 仔细检查在 Windows windows-latest 运行器上使用 python3 是否正确安装了依赖项——在某些 Windows 镜像上,更推荐使用 python 别名,因此此步骤可能会静默失败。
  • 你将 psutil~=7.0 和其他库提升了一个主要版本——请验证这些版本确实存在并且与你的代码保持 API 兼容,以避免意外的导入错误。
供AI代理使用的提示
请处理此代码审查中的注释:
## 总体评论
- 确保你的 PyInstaller 和 Nuitka 构建步骤明确包含 `data` 包(例如使用 `--add-data``--include-raw-dir`),以便 `importlib.resources.files('data')` 能够实际找到你的嵌入式 ZIP 文件。
- 仔细检查在 Windows `windows-latest` 运行器上使用 `python3` 是否正确安装了依赖项——在某些 Windows 镜像上,更推荐使用 `python` 别名,因此此步骤可能会静默失败。
- 你将 `psutil~=7.0` 和其他库提升了一个主要版本——请验证这些版本确实存在并且与你的代码保持 API 兼容,以避免意外的导入错误。

## 个别评论

### Comment 1
<location> `install_windows.py:37` </location>
<code_context>
     return [
-        "https://ghfast.top"
-        "https://gh.ddlc.top",
+        "https://ghfast.top" "https://gh.ddlc.top",
         "https://slink.ltd",
         "https://cors.isteed.cc",
</code_context>

<issue_to_address>
代理列表中URL之间缺少逗号。

缺少的逗号将两个URL合并,创建了一个无效条目,可能会破坏代理选择。请用逗号将它们分开。
</issue_to_address>

### Comment 2
<location> `.github/workflows/windows.yml:24` </location>
<code_context>
       matrix:
         builder: [pyinstaller, nuitka]
+    env:
+      PYTHONOPTIMIZATION: 2
     runs-on: windows-latest
     steps:
</code_context>

<issue_to_address>
环境变量名称可能存在拼写错误。

'PYTHONOPTIMIZATION' 应为 'PYTHONOPTIMIZE' 以设置 Python 优化级别;否则,此变量将无效。
</issue_to_address>

<suggested_fix>
<<<<<<< SEARCH
    env:
      PYTHONOPTIMIZATION: 2
=======
    env:
      PYTHONOPTIMIZE: 2
>>>>>>> REPLACE

</suggested_fix>

### Comment 3
<location> `.github/workflows/windows.yml:38` </location>
<code_context>
         run: |
-          python -m pip install --upgrade pip
-          pip install -r requirements.txt
+          python3 -m pip install --upgrade pip
+          python3 -m pip install -r requirements.txt

       - name: Download External Data Release
</code_context>

<issue_to_address>
硬编码 'python3' 可能会在 Windows 运行器上导致问题。

在 Windows 上,'python3' 可能不可用;使用 'python' 可以提高跨平台兼容性。
</issue_to_address>

<suggested_fix>
<<<<<<< SEARCH
          python3 -m pip install --upgrade pip
          python3 -m pip install -r requirements.txt
=======
          python -m pip install --upgrade pip
          python -m pip install -r requirements.txt
>>>>>>> REPLACE

</suggested_fix>

### Comment 4
<location> `.github/workflows/windows.yml:75` </location>
<code_context>
           LVtag: ${{ env.LVtag }}
         run: |
-          python -m pip install ${{ matrix.builder }}
+          # python3 -m pip install ${{ matrix.builder }}

           if ('${{ matrix.builder }}' -eq 'nuitka') {
</code_context>

<issue_to_address>
构建器安装被注释掉了。

如果构建器尚未安装,这可能会导致构建失败。
</issue_to_address>

## 安全问题

### Issue 1
<location> `install_windows.py:20` </location>

<issue_to_address>
**安全 (python.lang.compatibility.python37-compatibility-importlib2):** 发现 'importlib.resources',这是一个只在 Python 3.7+ 中可用的模块。这在较低版本中不起作用,因此不向后兼容。请使用 importlib_resources 代替以支持较旧的 Python 版本。

*来源: opengrep*
</issue_to_address>

### Issue 2
<location> `install_windows.py:295` </location>

<issue_to_address>
**安全 (python.lang.security.audit.dangerous-system-call-audit):** 发现系统调用中使用了动态内容。如果外部数据可以到达此函数调用,这是危险的,因为它允许恶意行为者执行命令。请改用 'subprocess' 模块,它更容易使用,而不会意外地暴露命令注入漏洞。

*来源: opengrep*
</issue_to_address>

Sourcery 对开源项目免费 - 如果您喜欢我们的评论,请考虑分享它们 ✨
帮助我更有用!请在每条评论上点击 👍 或 👎,我将利用您的反馈来改进您的评论。
Original comment in English

Hey @LY-Xiang - I've reviewed your changes - here's some feedback:

Blocking issues:

  • Found 'importlib.resources', which is a module only available on Python 3.7+. This does not work in lower versions, and therefore is not backwards compatible. Use importlib_resources instead for older Python versions. (link)
  • Found dynamic content used in a system call. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Use the 'subprocess' module instead, which is easier to use without accidentally exposing a command injection vulnerability. (link)

General comments:

  • Make sure your PyInstaller and Nuitka build steps explicitly include the data package (e.g. with --add-data or --include-raw-dir) so that importlib.resources.files('data') can actually find your embedded ZIP files.
  • Double-check that using python3 on the Windows windows-latest runner installs dependencies correctly—on some Windows images the python alias is preferred, so this step could silently fail.
  • You bumped psutil~=7.0 and other libraries by a major version—verify these versions actually exist and remain API-compatible with your code to avoid unexpected import errors.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Make sure your PyInstaller and Nuitka build steps explicitly include the `data` package (e.g. with `--add-data` or `--include-raw-dir`) so that `importlib.resources.files('data')` can actually find your embedded ZIP files.
- Double-check that using `python3` on the Windows `windows-latest` runner installs dependencies correctly—on some Windows images the `python` alias is preferred, so this step could silently fail.
- You bumped `psutil~=7.0` and other libraries by a major version—verify these versions actually exist and remain API-compatible with your code to avoid unexpected import errors.

## Individual Comments

### Comment 1
<location> `install_windows.py:37` </location>
<code_context>
     return [
-        "https://ghfast.top"
-        "https://gh.ddlc.top",
+        "https://ghfast.top" "https://gh.ddlc.top",
         "https://slink.ltd",
         "https://cors.isteed.cc",
</code_context>

<issue_to_address>
Missing comma between URLs in proxy list.

The missing comma merges the two URLs, creating an invalid entry that could break proxy selection. Please separate them with a comma.
</issue_to_address>

### Comment 2
<location> `.github/workflows/windows.yml:24` </location>
<code_context>
       matrix:
         builder: [pyinstaller, nuitka]
+    env:
+      PYTHONOPTIMIZATION: 2
     runs-on: windows-latest
     steps:
</code_context>

<issue_to_address>
Possible typo in environment variable name.

'PYTHONOPTIMIZATION' should be 'PYTHONOPTIMIZE' to set the Python optimization level; otherwise, this variable will not have any effect.
</issue_to_address>

<suggested_fix>
<<<<<<< SEARCH
    env:
      PYTHONOPTIMIZATION: 2
=======
    env:
      PYTHONOPTIMIZE: 2
>>>>>>> REPLACE

</suggested_fix>

### Comment 3
<location> `.github/workflows/windows.yml:38` </location>
<code_context>
         run: |
-          python -m pip install --upgrade pip
-          pip install -r requirements.txt
+          python3 -m pip install --upgrade pip
+          python3 -m pip install -r requirements.txt

       - name: Download External Data Release
</code_context>

<issue_to_address>
Hardcoding 'python3' may cause issues on Windows runners.

On Windows, 'python3' may not be available; using 'python' improves cross-platform compatibility.
</issue_to_address>

<suggested_fix>
<<<<<<< SEARCH
          python3 -m pip install --upgrade pip
          python3 -m pip install -r requirements.txt
=======
          python -m pip install --upgrade pip
          python -m pip install -r requirements.txt
>>>>>>> REPLACE

</suggested_fix>

### Comment 4
<location> `.github/workflows/windows.yml:75` </location>
<code_context>
           LVtag: ${{ env.LVtag }}
         run: |
-          python -m pip install ${{ matrix.builder }}
+          # python3 -m pip install ${{ matrix.builder }}

           if ('${{ matrix.builder }}' -eq 'nuitka') {
</code_context>

<issue_to_address>
Builder installation is commented out.

If the builder is not already installed, this may cause the build to fail.
</issue_to_address>

## Security Issues

### Issue 1
<location> `install_windows.py:20` </location>

<issue_to_address>
**security (python.lang.compatibility.python37-compatibility-importlib2):** Found 'importlib.resources', which is a module only available on Python 3.7+. This does not work in lower versions, and therefore is not backwards compatible. Use importlib_resources instead for older Python versions.

*Source: opengrep*
</issue_to_address>

### Issue 2
<location> `install_windows.py:295` </location>

<issue_to_address>
**security (python.lang.security.audit.dangerous-system-call-audit):** Found dynamic content used in a system call. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Use the 'subprocess' module instead, which is easier to use without accidentally exposing a command injection vulnerability.

*Source: opengrep*
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread install_windows.py Outdated
return [
"https://ghfast.top"
"https://gh.ddlc.top",
"https://ghfast.top" "https://gh.ddlc.top",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

问题 (bug_risk): 代理列表中URL之间缺少逗号。

缺少的逗号将两个URL合并,创建了一个无效条目,可能会破坏代理选择。请用逗号将它们分开。

Original comment in English

issue (bug_risk): Missing comma between URLs in proxy list.

The missing comma merges the two URLs, creating an invalid entry that could break proxy selection. Please separate them with a comma.

Comment thread .github/workflows/windows.yml Outdated
Comment on lines +23 to +24
env:
PYTHONOPTIMIZATION: 2
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

问题 (typo): 环境变量名称可能存在拼写错误。

'PYTHONOPTIMIZATION' 应为 'PYTHONOPTIMIZE' 以设置 Python 优化级别;否则,此变量将无效。

Suggested change
env:
PYTHONOPTIMIZATION: 2
env:
PYTHONOPTIMIZE: 2
Original comment in English

issue (typo): Possible typo in environment variable name.

'PYTHONOPTIMIZATION' should be 'PYTHONOPTIMIZE' to set the Python optimization level; otherwise, this variable will not have any effect.

Suggested change
env:
PYTHONOPTIMIZATION: 2
env:
PYTHONOPTIMIZE: 2

Comment thread .github/workflows/windows.yml Outdated
Comment on lines +38 to +39
python3 -m pip install --upgrade pip
python3 -m pip install -r requirements.txt
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

建议 (bug_risk): 硬编码 'python3' 可能会在 Windows 运行器上导致问题。

在 Windows 上,'python3' 可能不可用;使用 'python' 可以提高跨平台兼容性。

Suggested change
python3 -m pip install --upgrade pip
python3 -m pip install -r requirements.txt
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
Original comment in English

suggestion (bug_risk): Hardcoding 'python3' may cause issues on Windows runners.

On Windows, 'python3' may not be available; using 'python' improves cross-platform compatibility.

Suggested change
python3 -m pip install --upgrade pip
python3 -m pip install -r requirements.txt
python -m pip install --upgrade pip
python -m pip install -r requirements.txt

Comment thread .github/workflows/windows.yml Outdated
LVtag: ${{ env.LVtag }}
run: |
python -m pip install ${{ matrix.builder }}
# python3 -m pip install ${{ matrix.builder }}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

问题 (bug_risk): 构建器安装被注释掉了。

如果构建器尚未安装,这可能会导致构建失败。

Original comment in English

issue (bug_risk): Builder installation is commented out.

If the builder is not already installed, this may cause the build to fail.

Comment thread install_windows.py
Comment thread install_windows.py


def download_file(url_or_path: str, filepath: str, timeout: int = 10):
try:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

问题 (code-quality): 我们发现了以下问题:

Original comment in English

issue (code-quality): We've found these issues:

Comment thread install_windows.py
return None
try:
return str(files("data"))
except:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

建议 (code-quality): 使用 except Exception: 而不是裸露的 except: (do-not-use-bare-except)

Suggested change
except:
except Exception:
Original comment in English

suggestion (code-quality): Use except Exception: rather than bare except: (do-not-use-bare-except)

Suggested change
except:
except Exception:

Comment thread install_windows.py
Comment on lines 686 to 689
releases = response.json()
if releases:
return releases[0]['tag_name']
return releases[0]["tag_name"]
return None
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

建议 (code-quality): 我们发现了以下问题:

Suggested change
releases = response.json()
if releases:
return releases[0]['tag_name']
return releases[0]["tag_name"]
return None
return releases[0]["tag_name"] if (releases := response.json()) else None
Original comment in English

suggestion (code-quality): We've found these issues:

Suggested change
releases = response.json()
if releases:
return releases[0]['tag_name']
return releases[0]["tag_name"]
return None
return releases[0]["tag_name"] if (releases := response.json()) else None

Comment thread install_windows.py

def get_internal_version(filename):
""" 获取内置版本号,假设内置版本文件命名为 {filename}-{version}.zip """
"""获取内置版本号,假设内置版本文件命名为 {filename}-{version}.zip"""
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

问题 (code-quality): 我们发现了以下问题:

Original comment in English

issue (code-quality): We've found these issues:

Comment thread install_windows.py
try:
# 检查命令行参数,决定是否启用静默安装
if '--silent' in sys.argv:
if "--silent" in sys.argv:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

问题 (code-quality): 将代码提取到函数中 [×2] (extract-method)

Original comment in English

issue (code-quality): Extract code out into function [×2] (extract-method)

@LY-Xiang LY-Xiang dismissed sourcery-ai[bot]’s stale review August 3, 2025 13:42

已对部分内容进行修改
剩余部分系历史遗留 暂不处理

@LY-Xiang LY-Xiang merged commit 1713b98 into LL1.2.4 Aug 3, 2025
2 of 6 checks passed
@LY-Xiang LY-Xiang deleted the improve/import branch August 3, 2025 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant