首页/ AI 技能 / @skilllib/skill-2117939930272412562
Skill站外收录 @skilllib/skill-2117939930272412562

google-docstring-assistant

辅助编写符合 Google Python 风格指南的 Python 文档字符串,支持 Args、Returns、Raises、Examples 等结构化章节,自动适配类型注解,提供模块级变量和 Todo 项的标准化描述能力。

0.0 (0) 41 次安装 原作者 编程导航
收录于 2026-01-22
文档处理 AI 技能

Skills.MD

# Google Docstring Assistant ## Quick start - Write docstrings using the Google Python Style Guide structure (Args, Returns, Raises, Examples, Attributes, etc.). - Keep sections as headers followed by indented blocks; break sections by resuming unindented text. - When types are annotated in code, omit them in docstrings unless clarity is improved. - Use `Examples` blocks with literal blocks (`::`) for commands or code snippets. - Document module-level variables consistently (all in `Attributes` or inline), and list TODOs in a `Todo` section. - See `references/google_docstring_rules.md` for full guidance and examples. ## Workflow 1) **Choose sections** - Functions: include `Args`, `Returns`, and `Raises` as needed. - Modules/classes: use `Attributes` and `Todo` when relevant; keep formatting consistent. 2) **Write clearly** - One docstring per object; keep it concise and informative. - Use indentation under each section header; separate sections by returning to unindented text. - Prefer Google-style wording; avoid duplicating annotated types unless helpful. 3) **Examples and scripts** - Use `Examples:` with indented literal blocks for shell commands or code snippets. - Include multi-line descriptions when needed; keep formatting readable. ## Reference - `references/google_docstring_rules.md`: full style description and examples.

评论 0

还没有评论,来抢沙发。