Skip to content

Commit

Permalink
Add ".py" suffix to sphinx-argparse generated docs
Browse files Browse the repository at this point in the history
This is important to produce the right command syntax when generating
command line reference in the user manual.  However, we shouldn't add
this kludge to the individual programs, but only to the documentation
using the :prog: syntax.

Change-Id: I2ec7ab00c63d5d386f187e54755c71ffc2dce429
  • Loading branch information
laf0rge committed Jun 9, 2023
1 parent f9a5ba5 commit f422eb1
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions docs/legacy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,4 @@ pySim-read usage
.. argparse::
:module: pySim-read
:func: option_parser
:prog: pySim-read.py
1 change: 1 addition & 0 deletions docs/shell.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ pySim-shell has a variety of command line arguments to control
.. argparse::
:module: pySim-shell
:func: option_parser
:prog: pySim-shell.py

Usage Examples
--------------
Expand Down
3 changes: 1 addition & 2 deletions pySim-read.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@
from pySim.utils import format_xplmn_w_act, dec_st
from pySim.utils import h2s, format_ePDGSelection

option_parser = argparse.ArgumentParser(prog='pySim-read',
description='Legacy tool for reading some parts of a SIM card',
option_parser = argparse.ArgumentParser(description='Legacy tool for reading some parts of a SIM card',
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
argparse_add_reader_args(option_parser)

Expand Down
2 changes: 1 addition & 1 deletion pySim-shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -949,7 +949,7 @@ def receive_fetch(self, pcmd: ProactiveCommand):



option_parser = argparse.ArgumentParser(prog='pySim-shell', description='interactive SIM card shell',
option_parser = argparse.ArgumentParser(description='interactive SIM card shell',
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
argparse_add_reader_args(option_parser)

Expand Down

0 comments on commit f422eb1

Please sign in to comment.