Better magic_underscore explanation in docstrings
オープン
@nicholas-esterer がすでに取り組んでいます。
2020年10月13日 から。
documentation
feature
P3
- 主要言語
- Python
- スター
- 18.8k
- フォーク
- 2.8k
- 平均マージ
- 16時間 26分
- マージ済み PR(30日)
- 21
説明
I'd love to have a better answer for this kind of thing: https://stackoverflow.com/questions/58990657/python-how-do-i-find-inspect-what-kind-of-arguments-a-function-accepts
Some thoughts:
- The constructors of all the
graph_objectsthat accept**kwargsshould include an entry for this in the docstring. - Wherever we accept another graph_object (e.g.
markeringo.Scatter) the docstring could mention that you can also tomarker_whatever? - Wherever we accept
**kwargs, the docstring for that item should contain some self-contained explanation of what magic-underscores are and a link to the relevant docs. Minimally something like "for any other arguementxin this function which accepts agraph_object, you may usex_ywhereyis a valid property of the correspondinggraph_object." - For generic methods like update/add etc we should mention the name of the relevant graph_object whose properties are accepted, so that they show up in the Sphinx doc and provide a trail that users can follow. E.g. in https://plot.ly/python-api-reference/generated/plotly.graph_objects.Figure.html#plotly.graph_objects.Figure.update_xaxes we should mention in
patchandkwargsthat the relevant attributes are to be found inplotly.graph_objects.layout.Xaxisetc.
@emmanuelle thoughts?
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
評価
この issue はまだ評価されていません。