praiskup / argparse-manpage

Automatically build man-pages for your Python project
Apache License 2.0
40 stars 22 forks source link

Bad manpage name when getting parser from function. #36

Closed PierreNeumann closed 2 years ago

PierreNeumann commented 2 years ago

If I try to get parser from function like with the command line example :

argparse-manpage --pyfile ./pythonfile --function get_parser --author me --author-email me@domain.com --project-name myproject --url https://pagure.io/myproject > cool-manpage.1

I have "argparse-manpage" as program name but if I get it from object then the program name is right :

argparse-manpage --pyfile ./pythonfile --object parser --author me --author-email me@domain.com --project-name myproject --url https://pagure.io/myproject > cool-manpage.1

praiskup commented 2 years ago

Thank you for the report. If you had some spare time, a patch would be appreciated!

Artanias commented 2 years ago

Was it fixed? I haven't been able to reproduce the given error. In my generated man file, the program name is as in ArgumentParser.

praiskup commented 2 years ago

Good point, I can not reproduce either. There's no fix in this repo, though something probably changed in Python in the meantime. This needs a test-case, and then close.