prometheus / prometheus/client_python

enhancement: docstring to be RST friendly.

Open
#848 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
4.4k
Forks
876
Avg merge
8d 4h
Merged PRs (30d)
1

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the metrics docstring in prometheus_client/metrics.py around line 516 and render its documentation with Sphinx to reproduce the formatting issue. Done means the relevant metrics docstrings render their code examples as RST code blocks rather than quote blocks.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.