Loading...
Loading...
Compare original and translation side by side
undefinedundefined
2. **Verify nothing unwanted is staged**:
```bash
git status --short*_SUMMARY.md*_REPORT.mdSESSION_*.mdtest_*.py.envtemp_docs_and_tests/
2. **验证没有不必要的文件被暂存**:
```bash
git status --short*_SUMMARY.md*_REPORT.mdSESSION_*.mdtest_*.py.envtemp_docs_and_tests/pre-commit installgit commitruff check --fixruff formatls -la .git/hooks/pre-commitpre-commit installgit commitruff check --fixruff formatls -la .git/hooks/pre-commitpython -m pytest tests/ -x --tb=short -qpython -m pytest tests/ -x --tb=short -qgit add .git add -Agit add src/tooluniverse/specific_file.py tests/specific_test.pygit commit -m "Clear, descriptive message"git push origin <branch-name>git add .git add -Agit add src/tooluniverse/specific_file.py tests/specific_test.pygit commit -m "清晰、描述性的提交信息"git push origin <branch-name>temp_docs_and_tests/| Pattern | Example |
|---|---|
| |
| |
| |
| |
| |
| |
| |
README.mdCHANGELOG.mdLICENSE.mdtemp_docs_and_tests/| 模式 | 示例 |
|---|---|
| |
| |
| |
| |
| |
| |
| |
README.mdCHANGELOG.mdLICENSE.mdtest_*.pytests/temp_docs_and_tests/| File | Purpose |
|---|---|
| One-off tool cleanup test |
| Ad-hoc tool validation |
| Ad-hoc tool validation |
| Bug reproduction |
| Ad-hoc tool validation |
| Skill test |
| Bug reproduction |
| Ad-hoc tool validation |
test_*.pytests/temp_docs_and_tests/| 文件 | 用途 |
|---|---|
| 一次性工具清理测试 |
| 临时工具验证 |
| 临时工具验证 |
| 复现Bug |
| 临时工具验证 |
| Skill测试 |
| 复现Bug |
| 临时工具验证 |
.envtemp_docs_and_tests/.claude/__pycache__/*.pyc.DS_Store.envtemp_docs_and_tests/.claude/__pycache__/*.pyc.DS_StoreKeyError: 'role'return_message=Truetu.run().get()messages = tu.run(calls, use_cache=True, return_message=True)
if msg.get("role") == "tool":KeyError: 'role'tu.run()return_message=True.get()messages = tu.run(calls, use_cache=True, return_message=True)
if msg.get("role") == "tool":TypeError: 'Mock' object is not subscriptableall_tool_dict_get_tool_instancemock_tu.all_tool_dict = {"Tool": mock_tool}
mock_tu._get_tool_instance = lambda name, cache=True: mock_tu.all_tool_dict.get(name)TypeError: 'Mock' object is not subscriptableall_tool_dict_get_tool_instancemock_tu.all_tool_dict = {"Tool": mock_tool}
mock_tu._get_tool_instance = lambda name, cache=True: mock_tu.all_tool_dict.get(name)__ = func()def__ = func()defgit statusgit rm -r --cached temp_docs_and_tests/
git rm --cached API_DISCOVERY_SESSION_SUMMARY.md
git commit -m "Remove temp files from tracking"git statusgit rm -r --cached temp_docs_and_tests/
git rm --cached API_DISCOVERY_SESSION_SUMMARY.md
git commit -m "停止跟踪临时文件".pre-commit-config.yamlrepos:
- repo: https://github.com/pre-commit/pre-commit-hooks
hooks: [end-of-file-fixer, trailing-whitespace, check-yaml, check-toml]
- repo: https://github.com/astral-sh/ruff-pre-commit
hooks: [ruff-check --fix, ruff-format]^(ToolUniverse/)?src/tooluniverse/.pre-commit-config.yamlrepos:
- repo: https://github.com/pre-commit/pre-commit-hooks
hooks: [end-of-file-fixer, trailing-whitespace, check-yaml, check-toml]
- repo: https://github.com/astral-sh/ruff-pre-commit
hooks: [ruff-check --fix, ruff-format]^(ToolUniverse/)?src/tooluniverse/| Task | Command |
|---|---|
| Activate hooks | |
| Run all tests | |
| Run specific test | |
| Check staged files | |
| Unstage a file | |
| Remove from tracking | |
| Move temp files | See Phase 1 commands |
| Run hooks manually | |
| 任务 | 命令 |
|---|---|
| 激活钩子 | |
| 运行所有测试 | |
| 运行特定测试 | |
| 检查暂存文件 | |
| 取消暂存文件 | |
| 停止跟踪文件 | |
| 移动临时文件 | 参考阶段1的命令 |
| 手动运行钩子 | |
temp_docs_and_tests/test_*.pytemp_docs_and_tests/pre-commit installpytest tests/ -x.envtemp_docs_and_tests/test_*.pytemp_docs_and_tests/pre-commit installpytest tests/ -x.envgit add <specific-files>git add .git add <specific-files>git add .