Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include specified type in the html #19

Open
johannesnauta opened this issue Sep 1, 2022 · 0 comments
Open

Include specified type in the html #19

johannesnauta opened this issue Sep 1, 2022 · 0 comments

Comments

@johannesnauta
Copy link

Problem

When writing arguments using argparse, one often includes the type of the variable (e.g., str, np.int32).
However as far as I can tell, when using sphinx-argparse this type is not included in the documentation.
I also cannot seem to find how to include the type anywhere in the documentation.
While errors are obviously thrown if the type of the argument is incorrect, is there a way to include the type of the argument that is include in the add_argument function in the documentation?

Example

parser.add_argument(
     '--hello', dest='hello', type=str, default='Hello world!'
)

should give something in the documentation html like

--train   type: str
    Default: 'Hello world!'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant