GeezerVison is showing github.com — Use `.. program::` and `.. option::` directives for modules with a documented CLI · Issue #130160 · python/cpython
Use .. program:: and .. option:: directives for modules with a documented CLI #130160DescriptionThis 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
Activitytomasr8 commented on Feb 15, 2025 Tangentially related, but the dis module uses the cmdoption directive (as opposed to option) to document its CLI. We might want to switch to option for consistency. picnixz commented on Feb 15, 2025 Yes, and cmdoption is actually deprecated so it's better to use option :) added a commit that references this issue on Feb 18, 2025gh-130160: use `.. program::` directive for documenting `ensurepip` C… Mr-Sunglasses commented on Feb 18, 2025 @pfmoore , @sobolevn
There are more files related that need to be changed that are mentioned in this issue, so it's good that we should reopen this until all those changes are encountered.
MetadataMetadataStatusShow more project fields
DevelopmentNo branches or pull requestsIssue actions
|