sphinx-doc / sphinx-argparse

A Sphinx extension to automatically document argparse commands and options
https://sphinx-argparse.readthedocs.org/
MIT License
32 stars 25 forks source link

Make argument and option section IDs more unique #44

Closed djhoese closed 4 months ago

djhoese commented 10 months ago

Closes #43

This adds the module name and function name (attribute name from the module) to the beginning of the section ID for Named Arguments and options sections. This allows the IDs to be unique and for sphinx to keep section numbering consistent. See the referenced issue for more information.

I'm not really sure how to add a test for this. Also this does not effect subcommand section IDs as I'm not sure I understand how those are structured. This PR solves my immediate problem.

djhoese commented 10 months ago

Looks like RTD is failing because CommonMark is an optional dependency but needed to generate the docs.