From 99e4186ca226cd4c1fdeafa0869de5ed4ed4073b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=A8?= Date: Sun, 30 Mar 2025 15:50:46 +0800 Subject: [PATCH] =?UTF-8?q?docs(README):=20=E6=9B=B4=E6=96=B0=E8=B4=A1?= =?UTF-8?q?=E7=8C=AE=E6=8C=87=E5=8D=97=E5=92=8C=E4=BE=9D=E8=B5=96=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 适配 Textual 3.0.0 版本 --- README.md | 2 +- README_EN.md | 2 +- pyproject.toml | 5 +++++ requirements.txt | Bin 840 -> 1430 bytes source/TUI/app.py | 18 +++++++++--------- 5 files changed, 16 insertions(+), 11 deletions(-) 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 e61b4681268093d318b04ab894975d352fc73f84..1d7389dc6ab932186cf6217fc6e3c9c2c52e6bf2 100644 GIT binary patch literal 1430 zcmZvc-ENyu5QO)-Qs2Q+E^~zYWiWmHd0P+*fjIt+A7BS*`fhtT#N@9+}#@#h-rmOU-%^yB>RrW zgR7SRHQ5u#o7jEdhXvgCj#?5u*-w;(Dlvvz(z9`Q<-obmkV`WzDSvi^oxcxiVt4qw zqvD30>UfO<%84#K*kivpGAq^FHkaKhARelS8Fo$bH z?0t8HT=z321Tn81MK!I_S^4Y~*ZO9z?Eg90jo)%(j@u)5hw3BU5aw_`)YE5jVhY8o zDX;r^JUg#Cr=0LZIUULdZ&w}}SZXRNIF-?H)uWwDuc^lGlXtJY_Due$J5fab+$y0pU&w%=`^$Yiw-00G6$K$NWS1aptQ|-XTn>{TbE)r~a&$5(N0PpU5d+wVQk@Ng>iz(8sHA$M$XY}{T&(_2IJe0%@$)N$hf z-jQiB!rOn-dq&gKSw^jQYG1}S&NjW)7g1gclsM4CN>o)#*aGfm5}P38PSy2ET?^2T zIV@j^nm&EM3YE+SxLXFN^+_FyC}}lD=~2+SR@b7bgmpDpc~&x%f}oM8w;0x3<4K(h ZNS5z48d1tvij?DI8;U*~567Y+e*tsI6tw^V 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 缺少必要的参数,请删除该文件,然后重新运行程序,自动生成默认配置文件!" )