client_python icon indicating copy to clipboard operation
client_python copied to clipboard

enhancement: docstring to be RST friendly.

Open aarnphm opened this issue 3 years ago • 5 comments
trafficstars

This is probably not a bug, but I'm just wondering whether there is a decision not to make docstring for metrics RST-friendly.

Let's take the documentation for https://github.com/prometheus/client_python/blob/db391dbc83df4202698a21463ae89d6fb3611ce2/prometheus_client/metrics.py#L516 as an example.

The code block will not be rendered as a code block but as a quotes block when using Sphinx.

aarnphm avatar Oct 23 '22 00:10 aarnphm

@marctc When you are starting to look at improving the developer docs this might be a good issue to address as well. I would say we want to make the docstrings as friendly as possible.

csmarchbanks avatar Oct 24 '22 14:10 csmarchbanks

I can contribute if this is needed.

aarnphm avatar Oct 24 '22 18:10 aarnphm

I created a proposal to discuss different options. Feel free to chim in!

marctc avatar Oct 24 '22 21:10 marctc

@aarnphm as @csmarchbanks stated in https://github.com/prometheus/client_python/issues/849#issuecomment-1290737285 lets go with Google style docstrings. If you have bandwidth feel free to grab this issue, otherwise I'd work on this at some point.

marctc avatar Oct 27 '22 13:10 marctc

sounds good.

aarnphm avatar Oct 27 '22 17:10 aarnphm