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
Classes | Functions
lsst.pipe.base.connections Namespace Reference

Classes

class  ScalarError
 
class  PipelineTaskConnectionDict
 
class  PipelineTaskConnectionsMetaclass
 
class  QuantizedConnection
 
class  InputQuantizedConnection
 
class  OutputQuantizedConnection
 
class  DeferredDatasetRef
 
class  PipelineTaskConnections
 

Functions

typing.Generator[BaseConnection, None, None] iterConnections (PipelineTaskConnections connections, Union[str, Iterable[str]] connectionType)
 

Function Documentation

◆ iterConnections()

typing.Generator[BaseConnection, None, None] lsst.pipe.base.connections.iterConnections ( PipelineTaskConnections  connections,
Union[str, Iterable[str]]   connectionType 
)
Creates an iterator over the selected connections type which yields
all the defined connections of that type.

Parameters
----------
connections: `PipelineTaskConnections`
    An instance of a `PipelineTaskConnections` object that will be iterated
    over.
connectionType: `str`
    The type of connections to iterate over, valid values are inputs,
    outputs, prerequisiteInputs, initInputs, initOutputs.

Yields
-------
connection: `BaseConnection`
    A connection defined on the input connections object of the type
    supplied.  The yielded value Will be an derived type of
    `BaseConnection`.

Definition at line 501 of file connections.py.

503  ) -> typing.Generator[BaseConnection, None, None]:
504  """Creates an iterator over the selected connections type which yields
505  all the defined connections of that type.
506 
507  Parameters
508  ----------
509  connections: `PipelineTaskConnections`
510  An instance of a `PipelineTaskConnections` object that will be iterated
511  over.
512  connectionType: `str`
513  The type of connections to iterate over, valid values are inputs,
514  outputs, prerequisiteInputs, initInputs, initOutputs.
515 
516  Yields
517  -------
518  connection: `BaseConnection`
519  A connection defined on the input connections object of the type
520  supplied. The yielded value Will be an derived type of
521  `BaseConnection`.
522  """
523  if isinstance(connectionType, str):
524  connectionType = (connectionType,)
525  for name in itertools.chain.from_iterable(getattr(connections, ct) for ct in connectionType):
526  yield getattr(connections, name)