[issue39809] argparse: add max_text_width parameter to ArgumentParser

Luca report at bugs.python.org
Fri Mar 6 16:34:21 EST 2020


Luca <lucatrv at hotmail.com> added the comment:

The issue has been fixed in `typeshed`, so the following is now allowed:

width = min(80, shutil.get_terminal_size().columns - 2)
formatter_class = lambda prog: argparse.RawDescriptionHelpFormatter(prog, width=width)

https://github.com/python/typeshed/issues/3806#event-3104796040

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39809>
_______________________________________


More information about the Python-bugs-list mailing list