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

%(prog)s format specifier is not converted in description and epilog #130

Open
schlepuetz opened this issue Aug 26, 2020 · 1 comment
Open

Comments

@schlepuetz
Copy link

The %(prog)s format specifier of argparse does not seem to be picked up and replaced by the program name in the description and epilog arguments to argparse.

I frequently add usage examples in the epilog of the following form:

epilog = ('''
Examples:

* Run the script with the verbose option:

    %(prog)s -v
''')

This issue seems to have been partially addressed in Fix #27, and the solution works well for the help arguments of individual argument definitions, as well as the parser`s usage argument. However, it does not seem to be applied to the ```description``` and ```epilog```.

So it seems the solution already exists and would hopefully not be too difficult to extend to include description and epilog as well.

Thanks for a great Sphinx extension, by the way!

@schlepuetz
Copy link
Author

Sorry, I just saw right now that exactly this issue seems to be already addressed in a pull requets:
#113

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