根据类型添加行
根据文件类型,向指定文件中添加对应的代码行。
⚠️ TODO: 该功能为历史功能,行为待测试。
office/skills/file/add_line_by_type/
from office.skills.file import add_line_by_type
add_line_by_type(
add_line_dict={'import': 'import os'},
file_path='./test.py',
file_type='.py',
output_path='add_line'
)| 参数 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
add_line_dict | dict | 是 | - | 添加行的字典 |
file_path | str | 是 | - | 文件路径 |
file_type | str | 否 | '.py' | 文件类型 |
output_path | str | 否 | 'add_line' | 输出路径 |
None
office.api.file.add_line_by_type
2b1996b
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.