-
Notifications
You must be signed in to change notification settings - Fork 11
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
Incorrect line breaks put metavars on a new row all alone, detached from the argument #12
Comments
This is by design. The rich formatter uses parser = argparse.ArgumentParser(
formatter_class=lambda **k: RichHelpFormatter(max_help_position=45, **k)
) |
interesting. while there's no perfect definition of "correct' i will say that as a potential installer of the package as part of my package this caused me to hold off for the time being. for those of us accustomed to dealing with |
I'd like to point though that Edit: I will work on changing this in the next release |
i was going to suggest that instead maybe it's worth considering ditching the use of |
enjoying this library but ran into a situation where regular
argparse
does line breaks correctly and this does them in a way that makes it hard to understand the options. Here's the output ofrich_argparse
that's an issue. The example is from for the help text of the pdfalyzer, a PDF analysis tool i just released. (thess are just a snippet to show the issue but the full help text can be viewed in the pdfalyzer README here and theargparse
code that creates them can be viewed here if either of those things is helpful).Take a look at where the
PCT_CONFIDENCE
andSTREAM_DUMP_DIR
metavars end up:PCT_CONFIDENCE
andSTREAM_DUMP_DIR
are all alone in the universe with no map home.For comparison this is how regular
argparse
handles it, placing the metavars on the same line as the argument they relate to.The text was updated successfully, but these errors were encountered: