Skip to content

Conversation

@SigureMo
Copy link
Member

@SigureMo SigureMo commented Jul 15, 2022

添加一个自动向中英文之间添加空格的 hook,详情见 https://github.com/ShigureLab/dochooks

类似 #4973,只不过 #4973 只是一个简单的工具,只能一次性修复过去的问题,无法对以后出现的问题进行规范化

另外就是,初步验证了 hook 的写法,之后可以在 dochooks 里再添加对中文 reStructureText API 文档进行 lint 的 hook,以进一步规范中文 API doc 格式

Note

该 hook 目前仅支持 Python3.7 及以上(Python3.6 已经 EOL 了,现在大多数主流框架/库都 drop 了 3.6 支持),这可能要求开发者本地环境和 CI 环境(CI 应当没问题)都在 Python3.7+

@paddle-bot
Copy link

paddle-bot bot commented Jul 15, 2022

感谢你贡献飞桨文档,文档预览构建中,Docs-New 跑完后即可预览,预览链接:http://preview-pr-5083.paddle-docs-preview.paddlepaddle.org.cn/documentation/docs/zh/api/index_cn.html
预览工具的更多说明,请参考:[Beta]飞桨文档预览工具

@paddle-bot
Copy link

paddle-bot bot commented Jul 15, 2022

✅ This PR's description meets the template requirements!
Please wait for other CI results.

@SigureMo SigureMo changed the title [WIP][hooks] just a test PR, don't review [WIP][hooks] add a pre-commit hook to automatically insert space to cn and en char Jul 15, 2022
@SigureMo
Copy link
Member Author

此外,使格式 checker hooks 不仅作用于 Markdown 文件,也作用于 reStructureText 文件

并自动更新了下陈旧的 hooks

@SigureMo SigureMo closed this Aug 1, 2022
@SigureMo SigureMo deleted the update-pre-commit-hooks branch August 1, 2022 13:22
@SigureMo SigureMo changed the title [WIP][hooks] add a pre-commit hook to automatically insert space to cn and en char [Deprecated][hooks] add a pre-commit hook to automatically insert space to cn and en char Aug 4, 2022
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.

1 participant