diff --git a/README.md b/README.md index 14b8755..ce56ce7 100644 --- a/README.md +++ b/README.md @@ -535,7 +535,7 @@ A: 由于权限限制,您无法直接触发主仓库的 Actions。请通过 Fo
  • 在开始开发前,请从 develop 分支拉取最新的代码,以此为基础进行修改;这有助于避免合并冲突并保证您的改动基于最新的项目状态。
  • 如果您的更改涉及多个不相关的功能或问题,请将它们分成多个独立的提交或拉取请求。
  • 每个拉取请求应尽可能专注于单一功能或修复,以便于代码审查和测试。
  • -
  • 遵循现有的代码风格;请确保您的代码与项目中已有的代码风格保持一致。
  • +
  • 遵循现有的代码风格;请确保您的代码与项目中已有的代码风格保持一致;建议使用 Ruff 工具保持代码格式规范。
  • 编写可读性强的代码;添加适当的注释帮助他人理解您的意图。
  • 每个提交都应该包含一个清晰、简洁的提交信息,以描述所做的更改。提交信息应遵循以下格式:<类型>: <简短描述>
  • 当您准备提交拉取请求时,请优先将它们提交到 develop 分支;这是为了给维护者一个缓冲区,在最终合并到 master diff --git a/README_EN.md b/README_EN.md index 3d35931..67649b2 100644 --- a/README_EN.md +++ b/README_EN.md @@ -564,7 +564,7 @@ repository to execute the build process
  • Before starting development, please pull the latest code from the develop 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.
  • If your changes involve multiple unrelated features or issues, please split them into several independent commits or pull requests.
  • Each pull request should focus on a single feature or fix as much as possible, to facilitate code review and testing.
  • -
  • Follow the existing coding style; make sure your code is consistent with the style already present in the project.
  • +
  • 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.
  • Write code that is easy to read; add appropriate annotation to help others understand your intentions.
  • Each commit should include a clear and concise commit message describing the changes made. The commit message should follow this format: <type>: <short description>
  • When you are ready to submit a pull request, please prioritize submitting them to the develop branch; this provides maintainers with a buffer zone for additional testing and review before final merging into the master branch.
  • diff --git a/pyproject.toml b/pyproject.toml index 9e7786c..db10256 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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", +] diff --git a/requirements.txt b/requirements.txt index e61b468..1d7389d 100644 Binary files a/requirements.txt and b/requirements.txt differ diff --git a/source/TUI/app.py b/source/TUI/app.py index 6999aea..35f516f 100644 --- a/source/TUI/app.py +++ b/source/TUI/app.py @@ -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 缺少必要的参数,请删除该文件,然后重新运行程序,自动生成默认配置文件!" )