Belle II Software development
ArgumentParser Class Reference
Inheritance diagram for ArgumentParser:

Public Member Functions

def error (self, message)
 

Detailed Description

An argparse.Argument parse slightly changed such
that it always prints an extended help message increase of a parsing error.

Definition at line 18 of file utilities.py.

Member Function Documentation

◆ error()

def error (   self,
  message 
)
Method invoked when a parsing error occurred.
Writes an extended help over the base ArgumentParser.

Definition at line 23 of file utilities.py.

23 def error(self, message):
24 """Method invoked when a parsing error occurred.
25 Writes an extended help over the base ArgumentParser.
26 """
27 self.print_help()
28 sys.stderr.write(f'error: {message}\n')
29 sys.exit(2)
30
31

The documentation for this class was generated from the following file: