docs(README): 更新贡献指南和依赖文件

适配 Textual 3.0.0 版本
This commit is contained in:
2025-03-30 15:50:46 +08:00
parent 7f07dbff3e
commit 99e4186ca2
5 changed files with 16 additions and 11 deletions

View File

@ -535,7 +535,7 @@ A: 由于权限限制,您无法直接触发主仓库的 Actions。请通过 Fo
<li>在开始开发前,请从 <code>develop</code> 分支拉取最新的代码,以此为基础进行修改;这有助于避免合并冲突并保证您的改动基于最新的项目状态。</li>
<li>如果您的更改涉及多个不相关的功能或问题,请将它们分成多个独立的提交或拉取请求。</li>
<li>每个拉取请求应尽可能专注于单一功能或修复,以便于代码审查和测试。</li>
<li>遵循现有的代码风格;请确保您的代码与项目中已有的代码风格保持一致。</li>
<li>遵循现有的代码风格;请确保您的代码与项目中已有的代码风格保持一致;建议使用 Ruff 工具保持代码格式规范</li>
<li>编写可读性强的代码;添加适当的注释帮助他人理解您的意图。</li>
<li>每个提交都应该包含一个清晰、简洁的提交信息,以描述所做的更改。提交信息应遵循以下格式:<code>&lt;类型&gt;: &lt;简短描述&gt;</code></li>
<li>当您准备提交拉取请求时,请优先将它们提交到 <code>develop</code> 分支;这是为了给维护者一个缓冲区,在最终合并到 <code>master</code>

View File

@ -564,7 +564,7 @@ repository to execute the build process
<li>Before starting development, please pull the latest code from the <code>develop</code> branch as the basis for your modifications; this helps avoid merge conflicts and ensures your changes are based on the latest state of the project.</li>
<li>If your changes involve multiple unrelated features or issues, please split them into several independent commits or pull requests.</li>
<li>Each pull request should focus on a single feature or fix as much as possible, to facilitate code review and testing.</li>
<li>Follow the existing coding style; make sure your code is consistent with the style already present in the project.</li>
<li>Follow the existing coding style; make sure your code is consistent with the style already present in the project; please use the Ruff tool to maintain code formatting standards.</li>
<li>Write code that is easy to read; add appropriate annotation to help others understand your intentions.</li>
<li>Each commit should include a clear and concise commit message describing the changes made. The commit message should follow this format: <code>&lt;type&gt;: &lt;short description&gt;</code></li>
<li>When you are ready to submit a pull request, please prioritize submitting them to the <code>develop</code> branch; this provides maintainers with a buffer zone for additional testing and review before final merging into the <code>master</code> branch.</li>

View File

@ -107,3 +107,8 @@ docstring-code-format = false
# This only has an effect when the `docstring-code-format` setting is
# enabled.
docstring-code-line-length = "dynamic"
[dependency-groups]
dev = [
"textual-dev>=1.7.0",
]

Binary file not shown.

View File

@ -1,20 +1,20 @@
from textual.app import App
from textual.widgets import RichLog
from ..application import XHS
from ..module import (
ERROR,
ROOT,
Settings,
logging,
)
from ..translation import _
from .about import About
from .index import Index
from .loading import Loading
from .record import Record
from .setting import Setting
from .update import Update
from ..application import XHS
from ..module import (
ROOT,
ERROR,
)
from ..module import Settings
from ..module import logging
from ..translation import _
__all__ = ["XHSDownloader"]
@ -69,7 +69,7 @@ class XHSDownloader(App):
self.SETTINGS.check_keys(
self.parameter,
logging,
self.query_one(RichLog),
self.screen.query_one(RichLog),
_(
"配置文件 settings.json 缺少必要的参数,请删除该文件,然后重新运行程序,自动生成默认配置文件!"
)