aws-cloudformation / aws-cloudformation/cloudformation-cli-python-plugin

Improve docstrings for Hooks

未關閉
#269 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Python
星號
107
分支
46
PR 合併指標
30 天內沒有已合併 PR

描述

Hi there :wave:,

It would be nice to have Python docstrings included on the public interfaces when developing hooks.
Would pull requests for docstrings be welcome?

For example, after `cfn init` for hooks, we have a `../handlers.py` that looks similar to this:
![image](https://github.com/aws-cloudformation/cloudformation-cli-python-plugin/assets/2934552/9f35d4e1-a9bf-4ffd-840a-1b4dcef4a5bf)

In Visual Studio Code, when I hover over `cloudformation_cli_python_lib` specific classes/properties I don't get any information for what they are, or what to expect.

I couldn't find out what all the `request.hookContext` properties mean, and what `dict` keys are available on `request.hookContext.targetModel` from the [Implement Hook handlers (Python)](https://docs.aws.amazon.com/cloudformation-cli/latest/hooks-userguide/hooks-model.html#model-hook-project-code-handler-python) documentation.

In the case of `HookContext` some docstrings like this would be welcome:
![image](https://github.com/aws-cloudformation/cloudformation-cli-python-plugin/assets/2934552/4aaa6841-b274-4c36-9f1b-07d5b84f6770)

Cheers,
Neil

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。