LSST Applications  22.0.1,22.0.1+01bcf6a671,22.0.1+046ee49490,22.0.1+05c7de27da,22.0.1+0c6914dbf6,22.0.1+1220d50b50,22.0.1+12fd109e95,22.0.1+1a1dd69893,22.0.1+1c910dc348,22.0.1+1ef34551f5,22.0.1+30170c3d08,22.0.1+39153823fd,22.0.1+611137eacc,22.0.1+771eb1e3e8,22.0.1+94e66cc9ed,22.0.1+9a075d06e2,22.0.1+a5ff6e246e,22.0.1+a7db719c1a,22.0.1+ba0d97e778,22.0.1+bfe1ee9056,22.0.1+c4e1e0358a,22.0.1+cc34b8281e,22.0.1+d640e2c0fa,22.0.1+d72a2e677a,22.0.1+d9a6b571bd,22.0.1+e485e9761b,22.0.1+ebe8d3385e
LSST Data Management Base Package
Public Member Functions | List of all members
lsst.pipe.base.argumentParser.ConfigFileAction Class Reference
Inheritance diagram for lsst.pipe.base.argumentParser.ConfigFileAction:

Public Member Functions

def __call__ (self, parser, namespace, values, option_string=None)
 

Detailed Description

argparse action to load config overrides from one or more files.

Definition at line 1149 of file argumentParser.py.

Member Function Documentation

◆ __call__()

def lsst.pipe.base.argumentParser.ConfigFileAction.__call__ (   self,
  parser,
  namespace,
  values,
  option_string = None 
)
Load one or more files of config overrides.

Parameters
----------
parser : `argparse.ArgumentParser`
    Argument parser.
namespace : `argparse.Namespace`
    Parsed command. The following attributes are updated by this
    method: ``namespace.config``.
values : `list`
    A list of data config file paths.
option_string : `str`, optional
    Option value specified by the user.

Definition at line 1153 of file argumentParser.py.

1153  def __call__(self, parser, namespace, values, option_string=None):
1154  """Load one or more files of config overrides.
1155 
1156  Parameters
1157  ----------
1158  parser : `argparse.ArgumentParser`
1159  Argument parser.
1160  namespace : `argparse.Namespace`
1161  Parsed command. The following attributes are updated by this
1162  method: ``namespace.config``.
1163  values : `list`
1164  A list of data config file paths.
1165  option_string : `str`, optional
1166  Option value specified by the user.
1167  """
1168  if namespace.config is None:
1169  return
1170  for configfile in values:
1171  try:
1172  namespace.config.load(configfile)
1173  except Exception as e:
1174  parser.error(f"cannot load config file {configfile!r}: {e}")
1175 
1176 

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