Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf: 调整 Python Binding 初始化行为 #445

Merged
merged 11 commits into from
Dec 4, 2024
Merged

Conversation

weinibuliu
Copy link
Contributor

改动详情见 #443
讨论历史见 #444

weinibuliu and others added 2 commits December 4, 2024 15:42
fix: bugs

fix: bugs

fix: bugs

fix: 尝试调整 test 流程

fix: 修复路径问题

fix: 尝试调整 test.py

fix: 修复路径问题引起的异常

fix: 修复路径输出格式异常的问题

chore: 调整  Python Binding 初始化行为

- 调整包的初始化行为:
 - 将检查路径是否存在时改用 pathlib (替换掉原先的 os 库)
  - 当 Libraryopen() 函数返回 None 时,抛出错误
 - 当 `maa/bin` 路径不存在时,抛出错误

- 以下这些文件在初始化时不再检查 Library.initialized 的值:
`buffer.py` `controller.py` `resource.py` `tasker.py` `toolkit.py`

chore: 修复 binding test 不通过的问题;调整报错信息
source/binding/Python/maa/library.py Outdated Show resolved Hide resolved
test/python/binding_test.py Outdated Show resolved Hide resolved
@MistEO MistEO changed the title chore: 调整 Python Binding 初始化行为 perf: 调整 Python Binding 初始化行为 Dec 4, 2024
test/python/binding_test.py Outdated Show resolved Hide resolved
@MistEO MistEO linked an issue Dec 4, 2024 that may be closed by this pull request
@MistEO MistEO merged commit 5d309df into MaaXYZ:main Dec 4, 2024
18 checks passed
@weinibuliu weinibuliu deleted the dev branch December 4, 2024 16:01
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.

perf: 调整 Python Binding 初始化行为
2 participants