55
6612/20/25 - FlexiHelpFormatter is making progress in the review process. I'm
77replacing the formatter code here with that submission, with aliases with the
8- old names, for use with older Python versions.
9-
8+ old names, for use with older Python versions. The name has changed to
9+ ParagraphHelpFormatter. That class has been aliased to all of the old names
10+ that this module used to reference.
1011
1112
1213Argparse Paragraph Formatter
@@ -27,25 +28,21 @@ There are optional **RawDescriptionHelpFormatter** and
2728they do not perform any word wrapping. What is needed are formatters that
2829support more flexibility while still providing word wrapping.
2930
30- The ParagraphFormatter
31- ----------------------
31+ The ParagraphHelpFormatter
32+ --------------------------
3233
33- This module provides the ** ParagraphFormatter ** class. If this class is passed
34+ This module provides the ** ParagraphHelpFormatter ** class. If this class is passed
3435to the ** argparse.ArgumentParser** creation call as the * formatter_class*
3536argument, then help and epilog paragraphs, separated by single blank lines,
3637will be preserved. Word wrapping will be performed within the paragraphs.
3738
38- Note that ** ParagraphFormatter ** is implemented by overriding two private
39+ Note that ** ParagraphHelpFormatter ** is implemented by overriding two private
3940methods in the default ** argparse** formatter, and that the internals of that
4041class are not considered part of the ** argparse** API. There is therefore a
4142(vanishingly) small risk that the code may break with a future standard library
4243release. The module has been tested across all supported Python 3 versions.
4344
44-
45- The ParagraphHelpFormatter
46- ------------------
47-
48- This module provides that ** FlexiFormatter** class, with some modifications.
45+ This module provides that ** ParagraphHelpFormatter** class, with some modifications.
4946This formatter preserves line feeds and indentation, and understands bullet
5047lists.
5148
@@ -90,7 +87,7 @@ script shows the output for **ParagraphHelpFormatter**
9087
9188
9289 *************************
93- Using the Flexi formatter
90+ Using the Paragraph formatter
9491 *************************
9592
9693 usage: flexidemo.py [-h] [--arg ARG]
0 commit comments