CMS 3D CMS Logo

List of all members | Private Member Functions
extend_argparse.HelpFormatterRespectNewlines Class Reference
Inheritance diagram for extend_argparse.HelpFormatterRespectNewlines:

Private Member Functions

def _split_lines (self, text, width)
 

Detailed Description

Help message formatter which retains line breaks in argument descriptions.

Only the name of this class is considered a public API. All the methods
provided by the class are considered an implementation detail.

Definition at line 5 of file extend_argparse.py.

Member Function Documentation

◆ _split_lines()

def extend_argparse.HelpFormatterRespectNewlines._split_lines (   self,
  text,
  width 
)
private

Definition at line 12 of file extend_argparse.py.

References nano_mu_digi_cff.strip.

12  def _split_lines(self, text, width):
13  lines = []
14  for line in text.splitlines():
15  line = self._whitespace_matcher.sub(' ', line).strip()
16  lines.extend( _textwrap.wrap(line, width) )
17  return lines
18 
19 # argparse's formatters are not really able to discover the terminale size, so we override them