Skip to content

Use .. program:: and .. option:: directives for modules with a documented CLI #130160

@picnixz

Description

@picnixz

This is something (#129607 (comment)) I thought of when reviewing #129607. It's usually fine not to have links, but once we begin adding new command-line options to specific modules (e.g., http.server), I think it'd be nice to be able to reference them using Sphinx.

Using the .. program:: directive also improves readability. For instance, compare https://docs.python.org/3/library/dis.html#command-line-interface with https://docs.python.org/3/library/http.server.html where the CLI documentation is at the end of the page, without even a dedicated section.

I suggest going through the modules in #109435 and select those whose documentation page can be improved. By looking at the list, I found the following that can be improved:

quopri is both missing a documentation for its CLI so we can also add it. base64 as well, but I think it's meant to be undocumented. More modules can be found in #93096 as well.

For now, I suggest focusing on only those who already have a documented command-line interface and just improving them. Whether a module should have its main() function documented or not is out-of-scope for this issue.

Important

For those who want to work on the issue, please:

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dir
    No fields configured for issues without a type.

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions