def __call__(self, parser, namespace, values, option_string=None):
    """See https://docs.python.org/3/library/argparse.html#action-classes."""
    # This only prints flags when help is not argparse.SUPPRESS.
    # It includes user defined argparse flags, as well as main module's
    # key absl flags. Other absl flags use argparse.SUPPRESS, so they aren't
    # printed here.
    parser.print_help()

    absl_flags = parser._inherited_absl_flags  # pylint: disable=protected-access
    if absl_flags:
      modules = sorted(absl_flags.flags_by_module_dict())
      main_module = sys.argv[0]
      if main_module in modules:
        # The main module flags are already printed in parser.print_help().
        modules.remove(main_module)
      print(absl_flags._get_help_for_modules(  # pylint: disable=protected-access
          modules, prefix='', include_special_flags=True))
    parser.exit()
def __call__ ( self , parser , namespace , values , option_string = None ) : parser . print_help ( ) absl_flags = parser . _inherited_absl_flags if absl_flags : modules = sorted ( absl_flags . flags_by_module_dict ( ) ) main_module = sys . argv [ 0 ] if main_module in modules : modules . remove ( main_module ) print ( absl_flags . _get_help_for_modules ( modules , prefix = '' , include_special_flags = True ) ) parser . exit ( )
See https://docs.python.org/3/library/argparse.html#action-classes.