sphinx-doc / sphinx-argparse

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

fix: options formatter for manpages #50

Closed fmoessbauer closed 2 months ago

fmoessbauer commented 2 months ago

The "options" formatter for the manpage generation did not output any option, as the loop used a wrong key in the parser_info dictionary (likely a typo).

This patch fixes this, which results in correctly printed parser options in manpage mode.

fmoessbauer commented 2 months ago

The CI failure is unrelated.

ashb commented 2 months ago

Please add tests

fmoessbauer commented 2 months ago

Please add tests

The whole man page generation is not tested (yet). Unfortunately I don't have the time to start this from scratch. If others are interested, I'm happy to review, though. My fix is a minimal drive-by fix while checking why many sphinx-generated manpages lack the parser options entries (found while working on https://github.com/siemens/kas/commit/3f468481332e75db562d2939719f671b76590e2e).

ashb commented 2 months ago

Please add tests

The whole man page generation is not tested (yet). Unfortunately I don't have the time to start this from scratch. If others are interested, I'm happy to review, though. My fix is a minimal drive-by fix while checking why many sphinx-generated manpages lack the parser options entries (found while working on https://github.com/siemens/kas/commit/3f468481332e75db562d2939719f671b76590e2e).

Ack.